peek_all_key: Peek All Elements for One Key

View source: R/50-ordered_sequence-ops.R

peek_all_keyR Documentation

Peek All Elements for One Key

Description

Returns all elements whose key equals key.

Usage

peek_all_key(x, key)

Arguments

x

An ordered_sequence.

key

Query key.

Details

The returned ordered_sequence can be inspected with as.list().

Value

An ordered_sequence containing all matches; empty on miss.

Examples

x <- ordered_sequence("a", "b", "c", keys = c(1, 2, 2))
out <- peek_all_key(x, 2)
as.list(out)

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