Skip to main content

interface HashMap.NonEmpty<K,V>

A non-empty type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the HashMap API documentation

Type parameters

NameDescription
Kthe key type
Vthe value type
note
  • The HashMap uses the context's hasher instance to hash keys for performance.
    - The HashMap uses the context's eq function to determine equivalence between keys.
example
const m1 = HashMap.empty<number, string>()
const m2 = HashMap.of([1, 'a'], [2, 'b'])

Methods

stream

undocumented

Definition

stream(): Stream.NonEmpty<readonly [K, V]>;