Skip to contents

Returns both the popped element and the remaining sequence.

Usage

pop_front(x)

Arguments

x

A `flexseq`.

Value

A list with fields `element` and `remaining`.

Examples

s <- as_flexseq(letters[1:3])
out <- pop_front(s)
out$element
#> [1] "a"
out$remaining
#> FingerTree <size=2, named=no>
#>   monoids: none
#> 
#> [[1]]
#> [1] "b"
#> 
#> [[2]]
#> [1] "c"
#>