powered by
The pop function retrieves the first reachable object from .stack.
pop
.stack
pop(.stack)
A stack.
The object retrieved. If .stack is empty, an error is thrown.
The pop function is not pure. Side effect is that .stack is modified in the calling environment.
push.
push
# 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