CommutativeSemiGroup

trait CommutativeSemiGroup[a: Type] with SemiGroup[a]Source

A trait for types that form a commutative semigroup.

Instances

instance CommutativeSemiGroup[Float32]Source
instance CommutativeSemiGroup[Float64]Source
instance CommutativeSemiGroup[BigDecimal]Source
instance CommutativeSemiGroup[Map[k, v]] with Order[k], CommutativeSemiGroup[v]Source
instance CommutativeSemiGroup[MultiMap[k, v]] with Order[k], Order[v]Source
instance CommutativeSemiGroup[Set[a]] with Order[a]Source

Trait Definitions

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

An associative & commutative binary operation on a.