Stack.Tx
Transactions on stacks.
to_seq s
returns a domain safe sequence for iterating through the elements of the stack top to bottom.
The sequence is based on a constant time, O(1)
, snapshot of the stack and modifications of the stack have no effect on the sequence.
pop_opt s
removes and returns the topmost element of the stack s
, or None
if the stack is empty.