Learn R Programming

rstackdeque (version 1.1.1)

rotate: Generic maintenance function for rpqueues

Description

Generic maintenance function for rpqueues, called automatically when needed by other functions.

Usage

rotate(rpqueue, acclazylist, ...)

Arguments

rpqueue
rpqueue to rotate.
acclazylist
lazy list accumulator.
...
additional arguments to be passed to or from methods (ignored).

Value

a fully rotated rpqueue, but with the l list delayed in evaluation.

Details

See Simple and Efficient Purely Functional Queues and Deques, Okasaki 1995, J. Functional Programming, 5(4) 583 to 592 for information.

References

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

See Also

makeequal helper function that calls this one.