All pastes #880770 Raw Edit

k4st

public text v1 · immutable
#880770 ·published 2008-01-29 21:13 UTC
rendered paste body
// simple factorial function
factorial(x) => {
	if x is 0
		reutrn 1
	return x * factorial(x-1)
}

// simple stack class
Stack(Object) :> {
	-vals = []
	+push(x) => (vals <- x)
	+pop() => (vals -> return)
	+size() => #vals
}

my stack = Stack()