without_front: Return a version of an rdeque or rpqueue without the front...

Description Usage Arguments Details Value References Examples

View source: R/without_front.R

Description

Return a version of an rdeque or rpqueue without the front element

Usage

1

Arguments

x

rdeque or rpqueue to remove elements from.

...

additional arguments to be passed to or from methods (ignored).

Details

Simply returns a version of the given structure without the front element. The original is left alone.

Value

a version of the rdeque or rpqueue with the front element removed.

References

Okasaki, Chris. Purely Functional Data Structures. Cambridge University Press, 1999.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
d <- rdeque()
d <- insert_front(d, "a")
d <- insert_front(d, "b")
d <- insert_back(d, "c")

d2 <- without_front(d)
print(d2)

d3 <- without_front(d2)
print(d3)

print(d)

rstackdeque documentation built on May 2, 2019, 4:15 a.m.