peek_all_max: Peek All Maximum-Priority Elements

View source: R/40-priority_queue-queue-ops.R

peek_all_maxR Documentation

Peek All Maximum-Priority Elements

Description

Returns the full maximum-priority tie run as a priority_queue.

Usage

peek_all_max(x)

Arguments

x

A priority_queue.

Details

The return is another priority_queue(), use as.list() to convert the result to a standard R list.

Value

A priority_queue containing all maximum-priority elements in stable queue order. Returns an empty queue when x is empty.

Examples

x <- priority_queue("a", "b", "c", priorities = c(2, 3, 3))
peek_all_max(x)

Immutables documentation built on April 29, 2026, 1:06 a.m.