QueueL {collections}R Documentation

QueueL (R implementation)

Description

The QueueL function creates a queue. Pure R implementation for benchmarking.

Usage

QueueL(items = NULL)

Arguments

items

a list of items

Details

Following methods are exposed:

.$push(item)
.$pop()
.$peek()
.$clear()
.$size()
.$as_list()
.$print()

See Also

Queue

Examples

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

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

[Package collections version 0.2.2 Index]