trait Monoid[a: Type] with SemiGroup[a]
A trait for Monoids, objects that support an associative binary operation combine and neutral element empty.
combine
empty
instance Monoid[Chain[a]]
instance Monoid[DelayList[a]]
instance Monoid[PrecedenceGraph]
instance Monoid[Identity[a]] with Monoid[a]
instance Monoid[List[a]]
instance Monoid[Map[k, v]] with Order[k], Monoid[v]
instance Monoid[Unit]
instance Monoid[Int8]
instance Monoid[Int16]
instance Monoid[Int32]
instance Monoid[Int64]
instance Monoid[BigInt]
instance Monoid[Float32]
instance Monoid[Float64]
instance Monoid[BigDecimal]
instance Monoid[String]
instance Monoid[(a1, a2)] with Monoid[a1], Monoid[a2]
instance Monoid[(a1, a2, a3)] with Monoid[a1], Monoid[a2], Monoid[a3]
instance Monoid[(a1, a2, a3, a4)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4]
instance Monoid[(a1, a2, a3, a4, a5)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5]
instance Monoid[(a1, a2, a3, a4, a5, a6)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6]
instance Monoid[(a1, a2, a3, a4, a5, a6, a7)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6], Monoid[a7]
instance Monoid[(a1, a2, a3, a4, a5, a6, a7, a8)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6], Monoid[a7], Monoid[a8]
instance Monoid[(a1, a2, a3, a4, a5, a6, a7, a8, a9)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6], Monoid[a7], Monoid[a8], Monoid[a9]
instance Monoid[(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6], Monoid[a7], Monoid[a8], Monoid[a9], Monoid[a10]
instance Monoid[MultiMap[k, v]] with Order[k], Order[v]
instance Monoid[Option[a]] with Monoid[a]
instance Monoid[Any]
instance Monoid[All]
instance Monoid[Set[a]] with Order[a]
instance Monoid[Validation[e, t]] with Monoid[t]
instance Monoid[Vector[a]]
def empty(): a with Monoid[a]
Returns a neutral element.
def combine(x: a, y: a): a with Monoid[a]
Returns the result of combining x and y using SemiGroup's combine.
x
y
def fold(t: t[a]): a \ Aef[t] with Foldable[t], Monoid[a]
Returns the result of applying combine to all the elements in t, using empty as the initial value.
t