Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/ordered/main/index.ts>OrderedSortedSet.NonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface OrderedSortedSet.NonEmpty
implements [OrderedSetBase.NonEmpty]<T, OrderedSortedSet.Types>, Omit<OrderedSortedSet<T>, keyof OrderedSetBase.NonEmpty<any, any>>, [Streamable.NonEmpty]<T>
import { type OrderedSortedSet } from "https://deno.land/x/rimbu@1.0.2/ordered/main/index.ts";
const { NonEmpty } = OrderedSortedSet;

A non-empty type-invariant immutable Ordered SortedSet of value type T. In the Set, there are no duplicate values. See the Set documentation and the OrderedSortedSet API documentation

Examples

Example 1

const s1 = OrderedSortedSet.empty<string>()
const s2 = OrderedSortedSet.of('a', 'b', 'c')

Methods

stream(): Stream.NonEmpty<T>