% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/40-priority_queue-queue-ops.R
\name{pop_all_max}
\alias{pop_all_max}
\title{Pop All Maximum-Priority Elements}
\usage{
pop_all_max(x)
}
\arguments{
\item{x}{A \code{priority_queue}.}
}
\value{
A list with fields:
\itemize{
\item \code{elements}: \code{priority_queue} of removed maximum-priority elements.
\item \code{remaining}: queue after removal.
}
}
\description{
Removes the full maximum-priority tie run.
}
\details{
The return \code{elements} is another \code{priority_queue()}, use \code{as.list()} to
convert the result to a standard R list.
}
\examples{
x <- priority_queue("a", "b", "c", priorities = c(2, 3, 3))
out <- pop_all_max(x)
out$elements
out$remaining
}
