insert package:unordered-containers
Associate the specified value with the specified key in
this map. If this map previously contained a mapping for the key, the
old value is replaced.
Insert an element at the given position in this array,
increasing its size by one.
Add the specified value to this set.
>>> HashSet.insert 1 HashSet.empty
fromList [1]
insertModifying is a lot like insertWith; we use it to
implement alterF. It takes a value to insert when the key is absent
and a function to apply to calculate a new value when the key is
present. Thanks to the unboxed unary tuple, we avoid introducing any
unnecessary thunks in the tree.
Associate the value with the key in this map. If this map
previously contained a mapping for the key, the old value is replaced
by the result of applying the given function to the new and old value.
Example:
insertWith f k v map
where f new old = new + old
Insert an element at the given position in this array,
increasing its size by one.
In-place update version of insert