Stack
Stack implementation.
This is a subclass of List
.
Stack:push(val)
Adds a value to the stack.
Arguments:
val
(any
): value to add.
Returns:
- (
Stack
) modified stack
Stack:pop()
Returns and removes the value at the top of the stack.
Returns:
- (
any
) removed value