arrow-typeclasses / arrow.typeclasses / Monoid

Monoid

interface Monoid<A> : Semigroup<A>, MonoidOf<A>

Functions

combineAll open fun Collection<A>.combineAll(): A
Combine an Collection of A values.open fun combineAll(elems: List<A>): A
Combine an array of A values.
empty abstract fun empty(): A
A zero value for this A

Inherited Functions

combine abstract fun A.combine(b: A): A
Combine two A values.
maybeCombine open fun A.maybeCombine(b: A?): A
plus open operator fun A.plus(b: A): A

Extension Functions

const fun <A> A.const(): Const<A, Nothing>
fix fun <A> MonoidOf<A>.fix(): Monoid<A>
nest fun <F, G, A> UnnestedType<F, G, A>.nest(): NestedType<F, G, A>

Inheritors

Semiring interface Semiring<A> : Monoid<A>

Type Class Hierarchy