View source: R/30-api-flexseq-ends.R
| pop_back | R Documentation |
Returns the last element and the remaining sequence.
pop_back(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 last element, or NULL when x is empty.
remaining: the sequence after removing the last element.
s <- flexseq("a", "b", "c")
out <- pop_back(s)
out$value
out$remaining
s # unchanged
pop_back(flexseq())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.