Next: stacks iteration thunks, Previous: stacks filtering, Up: stacks [Index]
The following syntactic bindings are exported by the library
(vicare containers stacks)
. The syntactic bindings whose name
is prefixed with $
are unsafe operations: they do not
validate their arguments before accessing them.
Convert to and from a stack and a proper list. Objects from the list are pushed on the stack left–to–right from the bottom side.
(define D (list->stack '(0 1 2))) (stack-top D) ⇒ 0 (stack->list D) ⇒ (0 1 2)
Convert to and from a stack and a vector. Objects from the vector are pushed on the stack left–to–right from the bottom side.
(define D (vector->stack '#(0 1 2))) (stack-top D) ⇒ 0 (stack->vector D) ⇒ #(0 1 2)