MapFunctions
Value members
Concrete methods
Grab a value out of Map if it's present. Otherwise evaluate a value to be placed at that key in the Map.
Grab a value out of Map if it's present. Otherwise evaluate a value to be placed at that key in the Map.
As with Map.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
As with Map.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
Collect only elements with matching keys, joining their
associated values with f
.
Collect only elements with matching keys, joining their
associated values with f
.
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
- Note
iff
f
gives rise to a scalaz.Semigroup, so doesunionWith(_, _)(f)
.