stack::top()
Retrieve but not remove the top of the Stack, or return nothing if the Stack is empty
stack::top()
There are no parameters.
any — Returns the top of the Stack, or return nothing if the Stack is empty
import adt/stack
stack = stack()
stack.push(10)
stack.push(12)
stack.push(8)
writeln(stack.top()) ' Output: 8
writeln(stack.top()) ' Output: 8