pop_overlapping: Pop First Overlapping Interval

View source: R/60-interval_index-query-api.R

pop_overlappingR Documentation

Pop First Overlapping Interval

Description

Pop First Overlapping Interval

Usage

pop_overlapping(x, start, end, bounds = NULL)

Arguments

x

An interval_index.

start

Query interval start.

end

Query interval end.

bounds

Optional boundary override. One of "[)", "[]", "()", "(]".

Details

Removes the first match in canonical interval order. On miss, returns a non-throwing miss object with remaining = x. Use pop_all_overlapping() to remove all matches.

Value

A list with value, start, end, and remaining. On miss: value, start, and end are NULL.

Examples

ix <- interval_index("a", "b", "c", start = c(1, 3, 5), end = c(2, 4, 6))
pop_overlapping(ix, 2, 3)

Immutables documentation built on Sept. 26, 2026, 1:07 a.m.