powered by
The push function inserts an object into .stack.
push
.stack
push(.stack, x)
A stack.
An object to insert in .stack.
NULL is returned invisibly.
NULL
The push function is not pure. Side effects (made on purpose) are:
.stack is modified in the calling environment;
x is removed (deleted) if it exists in the calling environment.
x
pop.
pop
# NOT RUN { (s <- lifo(max_length = 3)) # empty LIFO (push(s, 0.3)) # (push(s, data.frame(x=1:2, y=2:3))) obj <- pop(s) # get the last element inserted # }
Run the code above in your browser using DataLab