aggcat.spad line 299 [edit on github]
A stack is a bag where the last item inserted is the first item extracted.
pop!(s) returns the top element x, destructively removing x from s. Note: Use top(s) to obtain x without removing it from s. Error: if s is empty.
push!(x, s) pushes x onto stack s, i.e. destructively changing s so as to have a new first (top) element x. Afterwards, pop!(s) produces x and pop!(s) produces the original s.
top(s) returns the top element x from s; s remains unchanged. Note: Use pop!(s) to obtain x and remove it from s.
BagAggregate(S)
Collection(S)
InnerEvalable(S, S)
Evalable(S)