| QueueL {collections} | R Documentation |
The QueueL function creates a queue.
Pure R implementation for benchmarking.
QueueL(items = NULL)
items |
a list of items |
Following methods are exposed:
.$push(item) .$pop() .$peek() .$clear() .$size() .$as_list() .$print()
item: any R object
q <- QueueL()
q$push("first")
q$push("second")
q$pop() # first
q$pop() # second
q <- QueueL(list("foo", "bar"))
q$push("baz")$push("bla")