R6 Class for a FIFO stack
This is a simple stack object offering add / pop functionality
stack
: A list containing the current stack
add()
Adds content to the end of the stack (must be a list)
Stack$add(x)
x
: content to add to the stack
pop()
Retrieve content from the stack
Stack$pop(i)
i
: the number of items to retrieve from the stack. If there are less than i
items left on the stack it will just return everything that is left.
clone()
The objects of this class are cloneable with this method.
Stack$clone(deep = FALSE)
deep
: Whether to make a deep clone.
Useful links