import { type SortedSet } from "https://deno.land/x/rimbu@0.13.5/core/main/index.ts";
const { Builder } = SortedSet;
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.
max(): T | undefined
Returns the maximum value of the SortedSet builder, or a fallback value (default: undefined) if the builder is empty.
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.