CRE
- The core type of the foldable (e.g. the HKT witness type, not the generic type : ListType.ยต)public interface Foldable<CRE>
Modifier and Type | Method and Description |
---|---|
<T> T |
foldLeft(com.aol.cyclops.Monoid<T> monoid,
com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
Starting from the left combine each value in turn with an accumulator
|
default <T> T |
foldLeft(T identity,
java.util.function.BinaryOperator<T> semigroup,
com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
Starting from the left combine each value in turn with an accumulator
|
<T> T |
foldRight(com.aol.cyclops.Monoid<T> monoid,
com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
Starting from the right combine each value in turn with an accumulator
|
default <T> T |
foldRight(T identity,
java.util.function.BinaryOperator<T> semigroup,
com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
Starting from the right combine each value in turn with an accumulator
|
<T> T foldRight(com.aol.cyclops.Monoid<T> monoid, com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
monoid
- Monoid to combine valuesds
- DataStructure to foldRightdefault <T> T foldRight(T identity, java.util.function.BinaryOperator<T> semigroup, com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
identity
- Identity value & defaultsemigroup
- Combining functionds
- DataStructure to foldRight<T> T foldLeft(com.aol.cyclops.Monoid<T> monoid, com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
monoid
- Monoid to combine valuesds
- DataStructure to foldLeftdefault <T> T foldLeft(T identity, java.util.function.BinaryOperator<T> semigroup, com.aol.cyclops.hkt.alias.Higher<CRE,T> ds)
identity
- Identity value & defaultsemigroup
- Combining functionds
- DataStructure to foldLeft