import { type Set } from "https://deno.land/x/rimbu@1.0.3/core/menu/menu.ts";
const { Builder } = Set.Sorted;
A mutable SortedSet
builder used to efficiently create new immutable instances.
See the Set documentation and the SortedSet.Builder API documentation
Methods
min(): T | undefined
Returns the minimum value of the SortedSet builder, or a fallback value (default: undefined) if the builder is empty.
min<O>(otherwise: OptLazy<O>): T | O
max(): T | undefined
Returns the maximum value of the SortedSet builder, or a fallback value (default: undefined) if the builder is empty.
max<O>(otherwise: OptLazy<O>): T | O
getAtIndex(index: number): T | undefined
Returns the value at the given index of the value sort order of the SortedSet builder, or a fallback value (default: undefined) if the index is out of bounds.
getAtIndex<O>(index: number, otherwise: OptLazy<O>): T | O