map

object map extends MapInstances with MapFunctions
class Object
trait Matchable
class Any

Value members

Inherited methods

final
def alter[K, A](m: Map[K, A], k: K)(f: Option[A] => Option[A]): Map[K, A]

Vary the value of m get k.

Vary the value of m get k.

Inherited from
MapFunctions
final
def getOrAdd[F[_], K, A](m: Map[K, A], k: K)(fa: => F[A])(implicit F: Applicative[F]): F[(Map[K, A], A)]

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.

Inherited from
MapFunctions
final
def insertWith[K, A](m1: Map[K, A], k: K, v: A)(f: (A, A) => A): Map[K, A]

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.

Inherited from
MapFunctions
final
def intersectWith[K, A, B, C](m1: Map[K, A], m2: Map[K, B])(f: (A, B) => C): Map[K, C]

Collect only elements with matching keys, joining their associated values with f.

Collect only elements with matching keys, joining their associated values with f.

Inherited from
MapFunctions
final
def intersectWithKey[K, A, B, C](m1: Map[K, A], m2: Map[K, B])(f: (K, A, B) => C): Map[K, C]

Like intersectWith, but tell f about the key.

Like intersectWith, but tell f about the key.

Inherited from
MapFunctions
final
def mapKeys[K, K2, A](m: Map[K, A])(f: K => K2): Map[K2, A]

Exchange keys of m according to f. Result may be smaller if f maps two or more Ks 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 Ks to the same K2, in which case the resulting associated value is an arbitrary choice.

Inherited from
MapFunctions
final
def unionWith[K, A](m1: Map[K, A], m2: Map[K, A])(f: (A, A) => A): Map[K, A]

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 does unionWith(_, _)(f).

Inherited from
MapFunctions
final
def unionWithKey[K, A](m1: Map[K, A], m2: Map[K, A])(f: (K, A, A) => A): Map[K, A]

Like unionWith, but telling f about the key.

Like unionWith, but telling f about the key.

Inherited from
MapFunctions

Implicits

Inherited implicits

implicit
def mapBand[K, V](implicit S: Band[V]): Band[Map[K, V]]
Inherited from
MapInstances0
implicit
def mapEqual[K : Order, V : Equal]: Equal[Map[K, V]]
Inherited from
MapInstances0
implicit
def mapFoldable[K]: Foldable[[_] =>> Map[K, _$7]]
Inherited from
MapInstances0
implicit
def mapInstance[K]: Traverse[[_] =>> Map[K, _$8]] & IsEmpty[[_] =>> Map[K, _$9]] & Bind[[_] =>> Map[K, _$10]] & Align[[_] =>> Map[K, _$11]]

Covariant over the value parameter, where plus applies the Last semigroup to values.

Covariant over the value parameter, where plus applies the Last semigroup to values.

Inherited from
MapInstances
implicit
def mapMonoid[K, V](implicit S: Semigroup[V]): Monoid[Map[K, V]]

Map union monoid, unifying values with V's append.

Map union monoid, unifying values with V's append.

Inherited from
MapInstances
implicit
def mapOrder[K : Order, V : Order]: Order[Map[K, V]]
Inherited from
MapInstances
implicit
def mapShow[K, V](implicit K: Show[K], V: Show[V]): Show[Map[K, V]]
Inherited from
MapInstances