addleft {container} | R Documentation |
Add Elements to the Left of Deques
Description
Add elements to left side of Deque objects.
Usage
addleft(.x, ...)
ref_addleft(.x, ...)
## S3 method for class 'Deque'
addleft(.x, ...)
## S3 method for class 'Deque'
ref_addleft(.x, ...)
Arguments
.x |
a |
... |
elements to be added. |
Value
For Deque, an object of class Deque with the elements being
added to the left of .x
.
Note
While addleft uses copy semantics ref_addleft work by reference.
Examples
d = deque(0)
add(d, a = 1, b = 2) # |0, a = 1, b = 2|
addleft(d, a = 1, b = 2) # |b = 2, a = 1, 0|
[Package container version 1.0.4 Index]