Modifier and Type | Method and Description |
---|---|
static <A> Monoid<Function<A,A>> |
Monoid.endoMonoid()
The monoid of endomorphisms under composition.
|
static <A> Monoid<A> |
Monoid.of(A zero,
Semigroup<A> semigroup)
Factory method for monoids, taking a zero and a Semigroup.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
Monoid.fold(Monoid<T> monoid,
Foldable<T> foldable)
Folds the elements of
Foldable from the left, starting with monoid.zero()
and successively calling monoid::combine . |
static <T> T |
Monoid.foldLeft(Monoid<T> monoid,
Foldable<T> foldable)
Folds the elements of
Foldable from the left, starting with monoid.zero()
and successively calling monoid::combine . |
static <T,U> U |
Monoid.foldMap(Monoid<U> monoid,
Foldable<T> foldable,
Function<? super T,? extends U> mapper)
Maps this elements to a
Monoid and applies foldLeft , starting with monoid.zero() : |
static <T> T |
Monoid.foldRight(Monoid<T> monoid,
Foldable<T> foldable)
Folds this elements from the right, starting with
monoid.zero() and successively calling monoid::combine . |
Copyright © 2017. All Rights Reserved.