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

x/rimbu/multiset/main/interface/hashed/interface.ts>HashMultiSet.NonEmpty

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

A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the HashMultiSet API documentation

Examples

Example 1

const m1 = HashMultiSet.empty<string>()
const m2 = HashMultiSet.of('a', 'b', 'a', 'c')

Methods

stream(): Stream.NonEmpty<T>