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. bigdecimalAdditionMonoidA monoid that adds big decimals.static Monoid<java.math.BigDecimal>Monoid. bigdecimalMultiplicationMonoidA monoid that multiplies big decimals.static Monoid<java.math.BigInteger>Monoid. bigintAdditionMonoidA monoid that adds big integers.static Monoid<java.math.BigInteger>Monoid. bigintMultiplicationMonoidA monoid that multiplies big integers.static Monoid<java.lang.Boolean>Monoid. conjunctionMonoidA monoid that ANDs booleans.static Monoid<java.lang.Boolean>Monoid. disjunctionMonoidA monoid that ORs booleans.static Monoid<java.lang.Boolean>Monoid. exclusiveDisjunctionMonoidA monoid that XORs booleans.static Monoid<java.lang.Integer>Monoid. intAdditionMonoidA monoid that adds integers.static Monoid<java.lang.Integer>Monoid. intMaxMonoidA monoid for the maximum of two integers.static Monoid<java.lang.Integer>Monoid. intMinMonoidA monoid for the minimum of two integers.static Monoid<java.lang.Integer>Monoid. intMultiplicationMonoidA monoid that multiplies integers.static Monoid<java.lang.Long>Monoid. longAdditionMonoidA monoid that adds longs.static Monoid<java.lang.Long>Monoid. longMultiplicationMonoidA monoid that multiplies longs.static Monoid<Natural>Monoid. naturalAdditionMonoidA monoid that adds natural numbers.static Monoid<Natural>Monoid. naturalMultiplicationMonoidA monoid that multiplies natural numbers.static Monoid<java.lang.StringBuffer>Monoid. stringBufferMonoidA monoid that appends string buffers.static Monoid<java.lang.StringBuilder>Monoid. stringBuilderMonoidA monoid that appends string builders.static Monoid<java.lang.String>Monoid. stringMonoidA monoid that appends strings.static Monoid<Unit>Monoid. unitMonoidA 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. monoidMethods 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> BSet. foldMap(F<A,B> f, Monoid<B> m)Folds this Set using the given monoid.<B> BTree. 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> BSet. 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 aTreeMapand 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. mMethods 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'sMonoidF<S,A>PTraversal. fold(Monoid<A> m)combine all targets using a target'sMonoidabstract <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 aMonoidand combine the results<M> F<S,M>Traversal. foldMap(Monoid<M> monoid, F<A,M> f)
-