addleft | R Documentation |
Add elements to left side of Deque objects.
addleft(.x, ...) ref_addleft(.x, ...) ## S3 method for class 'Deque' addleft(.x, ...) ## S3 method for class 'Deque' ref_addleft(.x, ...)
.x |
a |
... |
elements to be added. |
For Deque, an object of class Deque with the elements being
added to the left of .x
.
While addleft uses copy semantics ref_addleft work by reference.
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|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.