powered by
The Stack class creates a stack with pairlist backend.
Stack
An object of class R6ClassGenerator of length 24.
R6ClassGenerator
Stack$new(items = NULL) Stack$push(item) Stack$pop() Stack$peek() Stack$clear() Stack$size() Stack$as_list()
items: initialization list
items
item: any R object
item
StackL
# NOT RUN { s <- Stack$new() s$push("first") s$push("second") s$pop() # second s$pop() # first s <- Stack$new(list("foo", "bar")) s$push("baz")$push("bla") # }
Run the code above in your browser using DataLab