push_front {cppcontainers} | R Documentation |
Add an element to the front
Description
Add an element to the front of a container by reference.
Usage
push_front(x, value)
Arguments
x |
A CppDeque, CppForwardList, or CppList object. |
value |
A value to add to |
Value
Invisibly returns NULL
.
See Also
emplace_front, front, insert, pop_front, push_back.
Examples
d <- cpp_deque(4:6)
d
# 4 5 6
push_front(d, 14L)
d
# 14 4 5 6
[Package cppcontainers version 1.0.0 Index]