View source: R/30-api-flexseq-ends.R
| pop_front | R Documentation |
Returns the first element and the remaining sequence.
pop_front(x)
x |
A |
This operation is persistent: x is not modified.
On empty input, returns a non-throwing miss object with
value = NULL and remaining = x.
A list with fields:
value: the first element, or NULL when x is empty.
remaining: the sequence after removing the first element.
s <- flexseq("a", "b", "c")
out <- pop_front(s)
out$value
out$remaining
s # unchanged
pop_front(flexseq())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.