Stack

Stack implementation. This is a subclass of List.

Stack:push(val)

View source

Adds a value to the stack.

Arguments:

  • val (any): value to add.

Returns:

  • (Stack) modified stack

Stack:pop()

View source

Returns and removes the value at the top of the stack.

Returns:

  • (any) removed value