put method

IHashMap<K, V> put(
  1. K k,
  2. V v
)

Implementation

IHashMap<K, V> put(K k, V v) => new IHashMap.internal(_map.modify(k.hashCode,
    (existing) => new Cons(tuple2(k, v), existing.filter((kv) => kv.value1 != k)),
    new Cons(tuple2(k, v), nil())));