Skip to main content

interface HashMultiSet<T>

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

Companion namespace: HashMultiSet

Implemented by: HashMultiSet.NonEmpty<T>

Type parameters

NameDescription
Tthe value type
note
  • The HashMultiSet uses the contexts' HashMap mapContext to hash the values.
example
const m1 = HashMultiSet.empty<string>()
const m2 = HashMultiSet.of('a', 'b', 'a', 'c')