Skip to main content
Module

x/rimbu/mod.ts>OrderedSet.NonEmpty

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

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 OrderedSet API documentation

Examples

Example 1

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