QueueL {collections}R Documentation

Queue (list based)

Description

The QueueL class creates a queue with list backend. Pure R implementation, mainly for benchmark.

Usage

QueueL

Format

An object of class R6ClassGenerator of length 24.

Usage

QueueL$new(...)
QueueL$push(item)
QueueL$pop()
QueueL$peek()
QueueL$clear()
QueueL$size()
QueueL$as_list()

Argument

See Also

Queue

Examples

q <- QueueL$new()
q$push("first")
q$push("second")
q$pop()  # first
q$pop()  # second

q <- QueueL$new(list("foo", "bar"))
q$push("baz")$push("bla")

[Package collections version 0.1.6 Index]