import { type SortedSet } from "https://deno.land/x/rimbu@1.2.0/core/mod.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.