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
Name | Description |
---|---|
K | the key type |
V | the value type |
note
- The
HashMap
uses the context'shasher
instance to hash keys for performance.
- TheHashMap
uses the context'seq
function to determine equivalence between keys.
example
const m1 = HashMap.empty<number, string>()
const m2 = HashMap.of([1, 'a'], [2, 'b'])
Methods
stream
undocumented
stream
Definition
stream():
Stream.NonEmpty
<readonly [K, V]>;