Uses of Class
fj.Monoid
-
Packages that use Monoid Package Description fj Types that set the premise for the existence of Functional Java.fj.control.parallel Parallelization strategies.fj.data Common algebraic data types.fj.data.fingertrees Provides 2-3 finger trees, a functional representation of persistent sequences supporting access to the ends in amortized O(1) time.fj.data.optic Optic data types adapted from the Scala Monocle library and inspired by the Haskell Lens library. -
-
Uses of Monoid in fj
Fields in fj declared as Monoid Modifier and Type Field Description static Monoid<java.math.BigDecimal>
Monoid. bigdecimalAdditionMonoid
A monoid that adds big decimals.static Monoid<java.math.BigDecimal>
Monoid. bigdecimalMultiplicationMonoid
A monoid that multiplies big decimals.static Monoid<java.math.BigInteger>
Monoid. bigintAdditionMonoid
A monoid that adds big integers.static Monoid<java.math.BigInteger>
Monoid. bigintMultiplicationMonoid
A monoid that multiplies big integers.static Monoid<java.lang.Boolean>
Monoid. conjunctionMonoid
A monoid that ANDs booleans.static Monoid<java.lang.Boolean>
Monoid. disjunctionMonoid
A monoid that ORs booleans.static Monoid<java.lang.Boolean>
Monoid. exclusiveDisjunctionMonoid
A monoid that XORs booleans.static Monoid<java.lang.Integer>
Monoid. intAdditionMonoid
A monoid that adds integers.static Monoid<java.lang.Integer>
Monoid. intMaxMonoid
A monoid for the maximum of two integers.static Monoid<java.lang.Integer>
Monoid. intMinMonoid
A monoid for the minimum of two integers.static Monoid<java.lang.Integer>
Monoid. intMultiplicationMonoid
A monoid that multiplies integers.static Monoid<java.lang.Long>
Monoid. longAdditionMonoid
A monoid that adds longs.static Monoid<java.lang.Long>
Monoid. longMultiplicationMonoid
A monoid that multiplies longs.static Monoid<Natural>
Monoid. naturalAdditionMonoid
A monoid that adds natural numbers.static Monoid<Natural>
Monoid. naturalMultiplicationMonoid
A monoid that multiplies natural numbers.static Monoid<java.lang.StringBuffer>
Monoid. stringBufferMonoid
A monoid that appends string buffers.static Monoid<java.lang.StringBuilder>
Monoid. stringBuilderMonoid
A monoid that appends string builders.static Monoid<java.lang.String>
Monoid. stringMonoid
A monoid that appends strings.static Monoid<Unit>
Monoid. unitMonoid
A monoid for the Unit value.Methods in fj that return Monoid Modifier and Type Method Description static <A> Monoid<Array<A>>
Monoid. arrayMonoid()
A monoid for arrays.<B> Monoid<P2<A,B>>
Monoid. compose(Monoid<B> m)
Composes this monoid with another.<B,C>
Monoid<C>Monoid. compose(Monoid<B> mb, F<C,A> a, F<C,B> b, F2<A,B,C> c)
Monoid<A>
Monoid. dual()
Swaps the arguments when summing.static <A> Monoid<Option<A>>
Monoid. firstOptionMonoid()
A monoid for options that take the first available value.static <A,B>
Monoid<F<A,B>>Monoid. functionMonoid(Monoid<B> mb)
A monoid for functions.static <A> Monoid<IO<A>>
Monoid. ioMonoid(Monoid<A> ma)
A monoid for IO values.static <A> Monoid<Option<A>>
Monoid. lastOptionMonoid()
A monoid for options that take the last available value.Monoid<Option<A>>
Semigroup. lift()
Lifts the semigroup to obtain a trivial monoid.static <A> Monoid<List<A>>
Monoid. listMonoid()
A monoid for lists.Monoid<A>
Ord. maxMonoid(A zero)
Monoid<A>
Ord. minMonoid(A zero)
static <A> Monoid<A>
Monoid. monoid(F<A,F<A,A>> sum, A zero)
Constructs a monoid from the given sum function and zero value, which must follow the monoidal laws.static <A> Monoid<A>
Monoid. monoid(F2<A,A,A> sum, A zero)
Constructs a monoid from the given sum function and zero value, which must follow the monoidal laws.Monoid<A>
Semigroup. monoid(A zero)
Constructs a monoid from this semigroup and a zero value, which must follow the monoidal laws.static <A> Monoid<A>
Monoid. monoidDef(Monoid.AltDefinition<A> def)
Constructs a monoid from the given definition, which must follow the monoidal laws.static <A> Monoid<A>
Monoid. monoidDef(Monoid.Definition<A> def)
Constructs a monoid from the given definition, which must follow the monoidal laws.static <A> Monoid<A>
Monoid. monoidDef(Semigroup.AltDefinition<A> s, A zero)
Constructs a monoid from the given semigroup definition and zero value, which must follow the monoidal laws.static <A> Monoid<A>
Monoid. monoidDef(Semigroup.Definition<A> s, A zero)
Constructs a monoid from the given semigroup definition and zero value, which must follow the monoidal laws.static <A> Monoid<Option<A>>
Monoid. optionMonoid(Semigroup<A> aSemigroup)
Lift aSemigroup<A>
for A to aMonoid<Option<A>>
, using Option.none() as zero.static <A> Monoid<Set<A>>
Monoid. setIntersectionMonoid(Bounded<A> bounded, Enumerator<A> enumerator)
A intersection monoid for sets.static <A> Monoid<Set<A>>
Monoid. setMonoid(Ord<A> o)
A union monoid for sets.static <A> Monoid<Stream<A>>
Monoid. streamMonoid()
A monoid for streams.<B> Monoid<B>
Monoid. xmap(F<A,B> f, F<B,A> g)
Maps the given functions across this monoid as an invariant functor.Methods in fj with parameters of type Monoid Modifier and Type Method Description <B> Monoid<P2<A,B>>
Monoid. compose(Monoid<B> m)
Composes this monoid with another.<B,C>
Monoid<C>Monoid. compose(Monoid<B> mb, F<C,A> a, F<C,B> b, F2<A,B,C> c)
default F<Tree<A>,B>
F. foldMapTree(Monoid<B> m)
Returns a function that maps this function over a tree and folds it with the given monoid.static <A,B>
Monoid<F<A,B>>Monoid. functionMonoid(Monoid<B> mb)
A monoid for functions.static <A> Monoid<IO<A>>
Monoid. ioMonoid(Monoid<A> ma)
A monoid for IO values. -
Uses of Monoid in fj.control.parallel
Methods in fj.control.parallel with parameters of type Monoid Modifier and Type Method Description <A,B>
Promise<B>ParModule. parFoldMap(Stream<A> as, F<A,B> map, Monoid<B> reduce)
Maps with the given function across the given stream in parallel, while folding with the given monoid.<A,B>
Promise<B>ParModule. parFoldMap(Stream<A> as, F<A,B> map, Monoid<B> reduce, F<Stream<A>,P2<Stream<A>,Stream<A>>> chunking)
Maps with the given function across chunks of the given stream in parallel, while folding with the given monoid.<A,B>
Promise<B>ParModule. parFoldMap(java.lang.Iterable<A> as, F<A,B> map, Monoid<B> reduce)
Maps with the given function across the given iterable in parallel, while folding with the given monoid.<A,B>
Promise<B>ParModule. parFoldMap(java.lang.Iterable<A> as, F<A,B> map, Monoid<B> reduce, F<java.lang.Iterable<A>,P2<java.lang.Iterable<A>,java.lang.Iterable<A>>> chunking)
Maps with the given function across chunks of the given Iterable in parallel, while folding with the given monoid. -
Uses of Monoid in fj.data
Fields in fj.data declared as Monoid Modifier and Type Field Description private Monoid<W>
Writer. monoid
Methods in fj.data that return Monoid Modifier and Type Method Description Monoid<W>
Writer. monoid()
Methods in fj.data with parameters of type Monoid Modifier and Type Method Description static <K,A>
PriorityQueue<K,A>PriorityQueue. empty(Monoid<K> m, Equal<K> e)
Creates an empty priority queue.<B> B
Set. foldMap(F<A,B> f, Monoid<B> m)
Folds this Set using the given monoid.<B> B
Tree. foldMap(F<A,B> f, Monoid<B> m)
Folds this tree using the given monoid.static <A,B>
F<Tree<A>,B>Tree. foldMap_(F<A,B> f, Monoid<B> m)
Provides a function that folds a tree with the given monoid.<B> B
Set. foldMapRight(F<A,B> f, Monoid<B> m)
Folds this Set from the right using the given monoid.<B,C>
TreeMap<B,C>List. groupBy(F<A,B> keyFunction, F<A,C> valueFunction, Monoid<C> monoid, Ord<B> keyOrd)
Groups the elements of this list by a given keyFunction into aTreeMap
and transforms the matching elements with the given valueFunction.static <W,A>
Writer<W,A>Writer. unit(A a, Monoid<W> m)
static <W,A>
Writer<W,A>Writer. unit(A a, W w, Monoid<W> m)
Constructors in fj.data with parameters of type Monoid Constructor Description Writer(A a, W w, Monoid<W> m)
-
Uses of Monoid in fj.data.fingertrees
Fields in fj.data.fingertrees declared as Monoid Modifier and Type Field Description private Monoid<V>
Measured. m
Methods in fj.data.fingertrees that return Monoid Modifier and Type Method Description Monoid<V>
Measured. monoid()
Returns the monoid used to sum measures.Methods in fj.data.fingertrees with parameters of type Monoid Modifier and Type Method Description static <V,A>
FingerTree<V,A>FingerTree. empty(Monoid<V> m, F<A,V> f)
Creates an empty finger tree with elements of type A and node annotations of type V.static <V,A>
Measured<V,A>FingerTree. measured(Monoid<V> monoid, F<A,V> measure)
Constructs a Measured instance for the element type, given a monoid and a measuring function.static <V,A>
Measured<V,A>Measured. measured(Monoid<V> m, F<A,V> measure)
Constructors in fj.data.fingertrees with parameters of type Monoid Constructor Description Measured(Monoid<V> m, F<A,V> measure)
-
Uses of Monoid in fj.data.optic
Methods in fj.data.optic with parameters of type Monoid Modifier and Type Method Description F<S,A>
Fold. fold(Monoid<A> m)
combine all targets using a target'sMonoid
F<S,A>
PTraversal. fold(Monoid<A> m)
combine all targets using a target'sMonoid
abstract <M> F<S,M>
Fold. foldMap(Monoid<M> m, F<A,M> f)
abstract <M> F<S,M>
PTraversal. foldMap(Monoid<M> monoid, F<A,M> f)
map each target to aMonoid
and combine the results<M> F<S,M>
Traversal. foldMap(Monoid<M> monoid, F<A,M> f)
-