% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/30-api-flexseq-ends.R
\name{pop_front}
\alias{pop_front}
\title{Pop the Front Element}
\usage{
pop_front(x)
}
\arguments{
\item{x}{A \code{flexseq}.}
}
\value{
A list with fields:
\itemize{
\item \code{value}: the first element, or \code{NULL} when \code{x} is empty.
\item \code{remaining}: the sequence after removing the first element.
}
}
\description{
Returns the first element and the remaining sequence.
}
\details{
This operation is persistent: \code{x} is not modified.

On empty input, returns a non-throwing miss object with
\code{value = NULL} and \code{remaining = x}.
}
\examples{
s <- flexseq("a", "b", "c")
out <- pop_front(s)
out$value
out$remaining
s  # unchanged

pop_front(flexseq())
}
