CommutativeMonoid

trait CommutativeMonoid[a: Type] with Monoid[a]Source

A trait for types that form a commutative monoid.

Instances

instance CommutativeMonoid[Int16]Source
instance CommutativeMonoid[Int32]Source
instance CommutativeMonoid[Int64]Source
instance CommutativeMonoid[BigInt]Source
instance CommutativeMonoid[Float32]Source
instance CommutativeMonoid[Float64]Source
instance CommutativeMonoid[BigDecimal]Source
instance CommutativeMonoid[Map[k, v]] with Order[k], CommutativeMonoid[v]Source
instance CommutativeMonoid[MultiMap[k, v]] with Order[k], Order[v]Source
instance CommutativeMonoid[Option[a]] with CommutativeMonoid[a]Source
instance CommutativeMonoid[Set[a]] with Order[a]Source

Trait Definitions

def combine(x: a, y: a): a with CommutativeMonoid[a] Source

An associative & commutative binary operation on a.

def empty(): a with CommutativeMonoid[a] Source

Returns a neutral element.