arrow-core / arrow.typeclasses / Monoid

Monoid

interface Monoid<A> : Semigroup<A>

Functions

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

Companion Object Functions

boolean fun boolean(): Monoid<Boolean>
byte fun byte(): Monoid<Byte>
const fun <A, T> const(MA: Monoid<A>): Monoid<Const<A, T>>
double fun double(): Monoid<Double>
either fun <A, B> either(MA: Monoid<A>, MB: Monoid<B>): Monoid<Either<A, B>>
endo fun <A> endo(): Monoid<Endo<A>>
float fun float(): Monoid<Float>
int fun int(): Monoid<Int>
list fun <A> list(): Monoid<List<A>>
long fun long(): Monoid<Long>
map fun <K, A> map(SG: Semigroup<A>): Monoid<Map<K, A>>
option fun <A> option(MA: Semigroup<A>): Monoid<Option<A>>
pair fun <A, B> pair(MA: Monoid<A>, MB: Monoid<B>): Monoid<Pair<A, B>>
sequence fun <A> sequence(): Monoid<Sequence<A>>
short fun short(): Monoid<Short>
string fun string(): Monoid<String>
validated fun <E, A> validated(SE: Semigroup<E>, MA: Monoid<A>): Monoid<Validated<E, A>>

Do you like Arrow?

Arrow Org
<