MapAdditiveMonoid

algebra.instances.MapAdditiveMonoid
class MapAdditiveMonoid[K, V](implicit V: AdditiveSemigroup[V]) extends AdditiveMonoid[Map[K, V]]

Attributes

Source
map.scala
Graph
Supertypes
trait AdditiveMonoid[Map[K, V]]
trait AdditiveSemigroup[Map[K, V]]
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class MapSemiring[K, V]

Members list

Value members

Concrete methods

def plus(xs: Map[K, V], ys: Map[K, V]): Map[K, V]

Attributes

Source
map.scala
override def sum(as: IterableOnce[Map[K, V]]): Map[K, V]

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Attributes

Definition Classes
Source
map.scala
override def sumN(a: Map[K, V], n: Int): Map[K, V]

Attributes

Definition Classes
Source
map.scala
def zero: Map[K, V]

Attributes

Source
map.scala

Inherited methods

override def additive: Monoid[A]

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source
Additive.scala
def isZero(a: Map[K, V])(implicit ev: Eq[Map[K, V]]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
Source
Additive.scala
override def trySum(as: IterableOnce[Map[K, V]]): Option[A]

Given a sequence of as, combine them and return the total.

Given a sequence of as, combine them and return the total.

If the sequence is empty, returns None. Otherwise, returns Some(total).

Attributes

Definition Classes
Inherited from:
AdditiveMonoid
Source
Additive.scala