flix

0.55.0

Monoid

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

A trait for Monoids, objects that support an associative binary operation combine and neutral element empty.

Instances

instance Monoid[Chain[a]]Source
instance Monoid[DelayList[a]]Source
instance Monoid[PrecedenceGraph]Source
instance Monoid[Identity[a]] with Monoid[a]Source
instance Monoid[List[a]]Source
instance Monoid[Map[k, v]] with Order[k], Monoid[v]Source
instance Monoid[Unit]Source
instance Monoid[Int8]Source
instance Monoid[Int16]Source
instance Monoid[Int32]Source
instance Monoid[Int64]Source
instance Monoid[BigInt]Source
instance Monoid[Float32]Source
instance Monoid[Float64]Source
instance Monoid[BigDecimal]Source
instance Monoid[String]Source
instance Monoid[(a1, a2)] with Monoid[a1], Monoid[a2]Source
instance Monoid[(a1, a2, a3)] with Monoid[a1], Monoid[a2], Monoid[a3]Source
instance Monoid[(a1, a2, a3, a4)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4]Source
instance Monoid[(a1, a2, a3, a4, a5)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5]Source
instance Monoid[(a1, a2, a3, a4, a5, a6)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6]Source
instance Monoid[(a1, a2, a3, a4, a5, a6, a7)] with Monoid[a1], Monoid[a2], Monoid[a3], Monoid[a4], Monoid[a5], Monoid[a6], Monoid[a7]Source
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]Source
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]Source
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]Source
instance Monoid[MultiMap[k, v]] with Order[k], Order[v]Source
instance Monoid[Option[a]] with Monoid[a]Source
instance Monoid[Any]Source
instance Monoid[All]Source
instance Monoid[Set[a]] with Order[a]Source
instance Monoid[Validation[e, t]] with Monoid[t]Source
instance Monoid[Vector[a]]Source

Signatures

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

Returns a neutral element.

Trait Definitions

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

Returns the result of combining x and y using SemiGroup's combine.

Module Definitions

def fold(t: t[a]): a \ Aef[t] with Foldable[t], Monoid[a] Source

Returns the result of applying combine to all the elements in t, using empty as the initial value.