Uses of Interface
com.jnape.palatable.lambda.monad.Monad
-
-
Uses of Monad in com.jnape.palatable.lambda.adt
Classes in com.jnape.palatable.lambda.adt that implement Monad Modifier and Type Class Description classEither<L,R>The binary tagged union, implemented as a specializedCoProduct2.private static classEither.Left<L,R>private static classEither.Right<L,R>classMaybe<A>The optional type, representing a potentially absent value.private static classMaybe.Just<A>private static classMaybe.Nothing<A>classThese<A,B>The coproduct of a coproduct () and its product (CoProduct2<A, B>), represented as aTuple2<A, B>.CoProduct3<A, B,Tuple2<A, B>>private static classThese._A<A,B>private static classThese._B<A,B>private static classThese.Both<A,B>classTry<A>AMonadof the evaluation outcome of an expression that might throw.private static classTry.Failure<A>private static classTry.Success<A>Method parameters in com.jnape.palatable.lambda.adt with type arguments of type Monad Modifier and Type Method Description Either<L,R>Either. catchError(Fn1<? super L,? extends Monad<R,Either<L,?>>> recoveryFn)Maybe<A>Maybe. catchError(Fn1<? super Unit,? extends Monad<A,Maybe<?>>> recoveryFn)Try<A>Try. catchError(Fn1<? super java.lang.Throwable,? extends Monad<A,Try<?>>> recoveryFn)<R2> Either<L,R2>Either. flatMap(Fn1<? super R,? extends Monad<R2,Either<L,?>>> rightFn)If a right value, unwrap it and apply it torightFn, returning the resultingEither<L ,R>.<B> Maybe<B>Maybe. flatMap(Fn1<? super A,? extends Monad<B,Maybe<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<C> These<A,C>These. flatMap(Fn1<? super B,? extends Monad<C,These<A,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> Try<B>Try. flatMap(Fn1<? super A,? extends Monad<B,Try<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.adt.choice
Classes in com.jnape.palatable.lambda.adt.choice that implement Monad Modifier and Type Class Description classChoice2<A,B>Canonical ADT representation ofCoProduct2.private static classChoice2._A<A,B>private static classChoice2._B<A,B>classChoice3<A,B,C>Canonical ADT representation ofCoProduct3.private static classChoice3._A<A,B,C>private static classChoice3._B<A,B,C>private static classChoice3._C<A,B,C>classChoice4<A,B,C,D>Canonical ADT representation ofCoProduct4.private static classChoice4._A<A,B,C,D>private static classChoice4._B<A,B,C,D>private static classChoice4._C<A,B,C,D>private static classChoice4._D<A,B,C,D>classChoice5<A,B,C,D,E>Canonical ADT representation ofCoProduct5.private static classChoice5._A<A,B,C,D,E>private static classChoice5._B<A,B,C,D,E>private static classChoice5._C<A,B,C,D,E>private static classChoice5._D<A,B,C,D,E>private static classChoice5._E<A,B,C,D,E>classChoice6<A,B,C,D,E,F>Canonical ADT representation ofCoProduct6.private static classChoice6._A<A,B,C,D,E,F>private static classChoice6._B<A,B,C,D,E,F>private static classChoice6._C<A,B,C,D,E,F>private static classChoice6._D<A,B,C,D,E,F>private static classChoice6._E<A,B,C,D,E,F>private static classChoice6._F<A,B,C,D,E,F>classChoice7<A,B,C,D,E,F,G>Canonical ADT representation ofCoProduct7.private static classChoice7._A<A,B,C,D,E,F,G>private static classChoice7._B<A,B,C,D,E,F,G>private static classChoice7._C<A,B,C,D,E,F,G>private static classChoice7._D<A,B,C,D,E,F,G>private static classChoice7._E<A,B,C,D,E,F,G>private static classChoice7._F<A,B,C,D,E,F,G>private static classChoice7._G<A,B,C,D,E,F,G>classChoice8<A,B,C,D,E,F,G,H>Canonical ADT representation ofCoProduct8.private static classChoice8._A<A,B,C,D,E,F,G,H>private static classChoice8._B<A,B,C,D,E,F,G,H>private static classChoice8._C<A,B,C,D,E,F,G,H>private static classChoice8._D<A,B,C,D,E,F,G,H>private static classChoice8._E<A,B,C,D,E,F,G,H>private static classChoice8._F<A,B,C,D,E,F,G,H>private static classChoice8._G<A,B,C,D,E,F,G,H>private static classChoice8._H<A,B,C,D,E,F,G,H>Method parameters in com.jnape.palatable.lambda.adt.choice with type arguments of type Monad Modifier and Type Method Description <C> Choice2<A,C>Choice2. flatMap(Fn1<? super B,? extends Monad<C,Choice2<A,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<D> Choice3<A,B,D>Choice3. flatMap(Fn1<? super C,? extends Monad<D,Choice3<A,B,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<E> Choice4<A,B,C,E>Choice4. flatMap(Fn1<? super D,? extends Monad<E,Choice4<A,B,C,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<F> Choice5<A,B,C,D,F>Choice5. flatMap(Fn1<? super E,? extends Monad<F,Choice5<A,B,C,D,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<G> Choice6<A,B,C,D,E,G>Choice6. flatMap(Fn1<? super F,? extends Monad<G,Choice6<A,B,C,D,E,?>>> fn)Chain dependent computations that may continue or short-circuit based on previous results.<H> Choice7<A,B,C,D,E,F,H>Choice7. flatMap(Fn1<? super G,? extends Monad<H,Choice7<A,B,C,D,E,F,?>>> fn)Chain dependent computations that may continue or short-circuit based on previous results.<I> Choice8<A,B,C,D,E,F,G,I>Choice8. flatMap(Fn1<? super H,? extends Monad<I,Choice8<A,B,C,D,E,F,G,?>>> fn)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.adt.hlist
Classes in com.jnape.palatable.lambda.adt.hlist that implement Monad Modifier and Type Class Description classSingletonHList<_1>A singleton HList.classTuple2<_1,_2>A 2-element tuple product type, implemented as a specialized HList.classTuple3<_1,_2,_3>A 3-element tuple product type, implemented as a specialized HList.classTuple4<_1,_2,_3,_4>A 4-element tuple product type, implemented as a specialized HList.classTuple5<_1,_2,_3,_4,_5>A 5-element tuple product type, implemented as a specialized HList.classTuple6<_1,_2,_3,_4,_5,_6>A 6-element tuple product type, implemented as a specialized HList.classTuple7<_1,_2,_3,_4,_5,_6,_7>A 7-element tuple product type, implemented as a specialized HList.classTuple8<_1,_2,_3,_4,_5,_6,_7,_8>An 8-element tuple product type, implemented as a specialized HList.Method parameters in com.jnape.palatable.lambda.adt.hlist with type arguments of type Monad Modifier and Type Method Description <_1Prime> SingletonHList<_1Prime>SingletonHList. flatMap(Fn1<? super _1,? extends Monad<_1Prime,SingletonHList<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_2Prime> Tuple2<_1,_2Prime>Tuple2. flatMap(Fn1<? super _2,? extends Monad<_2Prime,Tuple2<_1,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_3Prime> Tuple3<_1,_2,_3Prime>Tuple3. flatMap(Fn1<? super _3,? extends Monad<_3Prime,Tuple3<_1,_2,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_4Prime> Tuple4<_1,_2,_3,_4Prime>Tuple4. flatMap(Fn1<? super _4,? extends Monad<_4Prime,Tuple4<_1,_2,_3,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_5Prime> Tuple5<_1,_2,_3,_4,_5Prime>Tuple5. flatMap(Fn1<? super _5,? extends Monad<_5Prime,Tuple5<_1,_2,_3,_4,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_6Prime> Tuple6<_1,_2,_3,_4,_5,_6Prime>Tuple6. flatMap(Fn1<? super _6,? extends Monad<_6Prime,Tuple6<_1,_2,_3,_4,_5,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_7Prime> Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>Tuple7. flatMap(Fn1<? super _7,? extends Monad<_7Prime,Tuple7<_1,_2,_3,_4,_5,_6,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<_8Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>Tuple8. flatMap(Fn1<? super _8,? extends Monad<_8Prime,Tuple8<_1,_2,_3,_4,_5,_6,_7,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.adt.hmap
Subinterfaces of Monad in com.jnape.palatable.lambda.adt.hmap Modifier and Type Interface Description interfaceSchema<Values extends HList>A lens that focuses on theheterogeneous listof values pointed at by one or moretypesafe keysthat must all exist in the sameHMapto be collectively extracted.interfaceTypeSafeKey<A,B>An interface representing a parametrized key for use inHMaps.static interfaceTypeSafeKey.Simple<A> -
Uses of Monad in com.jnape.palatable.lambda.functions
Subinterfaces of Monad in com.jnape.palatable.lambda.functions Modifier and Type Interface Description interfaceEffect<A>A function returning "no result", and therefore only useful as a side-effect.interfaceFn0<A>interfaceFn1<A,B>A function taking a single argument.interfaceFn2<A,B,C>A function taking two arguments.interfaceFn3<A,B,C,D>A function taking three arguments.interfaceFn4<A,B,C,D,E>A function taking four arguments.interfaceFn5<A,B,C,D,E,F>A function taking five arguments.interfaceFn6<A,B,C,D,E,F,G>A function taking six arguments.interfaceFn7<A,B,C,D,E,F,G,H>A function taking seven arguments.interfaceFn8<A,B,C,D,E,F,G,H,I>A function taking eight arguments.Method parameters in com.jnape.palatable.lambda.functions with type arguments of type Monad Modifier and Type Method Description default <B> Fn0<B>Fn0. flatMap(Fn1<? super A,? extends Monad<B,Fn1<Unit,?>>> f)default <C> Fn1<A,C>Fn1. flatMap(Fn1<? super B,? extends Monad<C,Fn1<A,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn1
Classes in com.jnape.palatable.lambda.functions.builtin.fn1 that implement Monad Modifier and Type Class Description classCatMaybes<A>Given an, return anIterable<Maybe<A>>of only the present values.Iterable<A>classCoalesce<L,R>classConstantly<A,B>A function that takes two arguments and always returns the first argument.classCycle<A>Given anIterable, return an infiniteIterablethat repeatedly cycles its elements, in order.classDistinct<A>Return anIterableof the distinct values from the given inputIterable.classDowncast<A extends B,B>Covariantly cast a value of typeBto a value of subtypeA.classEmpty<A>A predicate that returns true ifasis empty; false otherwise.classFlatten<A>Given a nestedIterableofIterables, return a lazily flatteningIterableof the nested elements.classForce<A>Deprecated.in favor oftraversinginto anIOand running itclassHead<A>Retrieve the head element of anIterable, wrapped in anMaybe.classId<A>The identity function.classInit<A>Given an, produce anIterable<A>of all elements but the last one.Iterable<A>classInits<A>Given an, produce anIterable<A>, representing all of the subsequences of initial elements, ordered by size, starting with the emptyIterable<Iterable<A>>Iterable.classLast<A>Retrieve the last element of anIterable, wrapped in aMaybe.classMagnetize<A>MagnetizeanIterableusing value equality as the magnetizing function.classNot<A>Negate a predicate function.classOccurrences<A>Given an, return aIterable<A>representing each unique element in theMap<A, Long>Iterablepaired with its number of occurrences.classRepeat<A>Given a value, return an infiniteIterablethat repeatedly iterates that value.classReverse<A>Given anIterable, return a reversed representation of thatIterable.classSizeclassSort<A extends java.lang.Comparable<A>>Given anIterableofComparableelements, return aListof the sorted elements.classTail<A>Returns the tail of anIterable; the is, anIterableof all the elements except for the head element.classTails<A>Given an, produce anIterable<A>, representing all of the subsequences of tail elements, ordered by size, starting with the fullIterable<Iterable<A>>Iterable.classUncons<A>classUpcast<A extends B,B>Upcast a value of typeBto a value of typeAthatBextends. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn2
Classes in com.jnape.palatable.lambda.functions.builtin.fn2 that implement Monad Modifier and Type Class Description class$<A,B>classAll<A>Eagerly apply a predicate to each element in anIterable, returningtrueif every element satisfies the predicate, andfalseotherwise.classAlter<A>classAny<A>Eagerly apply a predicate to each element in anIterable, returningtrueif any element satisfies the predicate, andfalseotherwise.classAutoBracket<A extends java.lang.AutoCloseable,B>classBoth<A,B,C>classCartesianProduct<A,B>Lazily compute the cartesian product of anIterable<A>andIterable<B>, returning anIterable<Tuple2<A, B>>, the products as tuples of multiplicandAs and multiplierBs.classCmpEq<A extends java.lang.Comparable<A>>Given twoComparablevalues of typeA, returntrueif the first value is strictly equal to the second value (according toComparable.compareTo(Object); otherwise, return false.classCons<A>Prepend an element to anIterable.classDifference<A>classDrop<A>Lazily skip the firstnelements from anIterableby returning anIterablethat begins iteration after thenthelement.classDropWhile<A>Lazily limit theIterableby skipping the first contiguous group of elements that satisfy the predicate, beginning iteration at the first element for which the predicate evaluates tofalse.classEq<A>Type-safe equality in function form; usesObject.equals(java.lang.Object), not==.classFilter<A>Lazily apply a predicate to each element in anIterable, returning anIterableof just the elements for which the predicate evaluated totrue.classFind<A>Iterate the elements in anIterable, applying a predicate to each one, returning the first element that matches the predicate, wrapped in aMaybe.classGroupBy<K,V>Given anIterable<V>vsand a key functionV -> Kf, foldvsinto aMap<K, List<V>>by applyingfto each element ofvs, retaining values that map to the same key in a list, in the order they were iterated in.classGT<A extends java.lang.Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is strictly greater than the first value; otherwise, return false.classGTE<A extends java.lang.Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is greater than or equal to the first value according toComparable.compareTo(Object); otherwise, return false.classInGroupsOf<A>Lazily group theIterableby returning anIterableof smallerIterables of sizek.classIntersperse<A>Lazily inject the provided separator value between each value in the suppliedIterable.classInto<A,B,C>Given anand aFn2<A, B, C>, destructure the entry and apply the key and value as arguments to the function, returning the result.Map.Entry<A, B>classInto1<A,B>Given anand aFn1<A, B>, pop the head and apply it to the function, returning the result.SingletonHList<A>classInto3<A,B,C,D>classInto4<A,B,C,D,E>classInto5<A,B,C,D,E,F>classInto6<A,B,C,D,E,F,G>classInto7<A,B,C,D,E,F,G,H>classInto8<A,B,C,D,E,F,G,H,I>classIterate<A>Lazily generate an infiniteIterablefrom the successive applications of the function first to the initial seed value, then to the result, and so on; i.e., the result ofiterate(x -> x + 1, 0)would produce an infiniteIterableover the elements0, 1, 2, 3, ...classLazyRec<A,B>classLT<A extends java.lang.Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is strictly less than the first value; otherwise, return false.classLTE<A extends java.lang.Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is less than or equal to the first value according toComparable.compareTo(Object)otherwise, return false.classMagnetizeBy<A>Given a binary predicate and an, return anIterable<A>of the contiguous groups of elements that match the predicate pairwise.Iterable<Iterable<A>>classMap<A,B>Lazily apply a function to each element in anIterable, producing anIterableof the mapped results.classPartition<A,B,C>Given anIterable<A>asand a disjoint mapping functiona -> CoProduct2<A, B>, return aTuple2over the lazily unwrapped leftAand rightBvalues in the first and second slots, respectively.classPeek<A,FA extends Functor<A,?>>classPeek2<A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>Deprecated.in favor of producing anIOfrom the givenBoundedBifunctorand explicitly running itclassPrependAll<A>Lazily prepend each value with of theIterablewith the supplied separator value.classReduceLeft<A>classReduceRight<A>classReplicate<A>Produce anIterableof a valuentimes.classSequence<A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>Given aTraversableofApplicatives and a pureApplicativeconstructor, traverse the elements from left to right, zipping theApplicatives together and collecting the results.classSlide<A>Given an, "slide" a window ofIterable<A>kelements across theIterableby one element at a time, returning an.Iterable<Iterable<A>>classSnoc<A>Opposite ofCons: lazily append an element to the end of the givenIterable.classSortBy<A,B extends java.lang.Comparable<B>>Given anIterableand some mapping function from theIterableelement type to someComparabletype, produce a sortedListof the original elements based on sorting applied to the result of the mapping function.classSortWith<A>Given anIterableand aComparatorover theIterableelement type, produce a sortedListof the original elements based on sorting applied by theComparator.classSpan<A>Given a predicate, return aTuple2where the first slot is the front contiguous elements of anIterablematching the predicate and the second slot is all the remaining elements.classTake<A>Lazily limit theIterabletonelements by returning anIterablethat stops iteration after thenthelement, or the last element of theIterable, whichever comes first.classTakeWhile<A>Lazily limit theIterableto the first group of contiguous elements that satisfy the predicate by iterating up to, but not including, the first element for which the predicate evaluates tofalse.classToArray<A>Write all the elements of anIterabledirectly into an array of the specified type.classToCollection<A,C extends java.util.Collection<A>>Given anFn0of someCollectionC, create an instance ofCand add all of the elements in the providedIterableto the instance.classToMap<K,V,M extends java.util.Map<K,V>>Given anFn0of someMapM, create an instance ofMand put all of the entries in the providedIterableinto the instance.classTupler2<A,B>Creates aTuple2from two values.classUnfoldr<A,B>classUntil<A>Given apredicate functionfor a value of some typeAand anIOthat yields a value of typeA, produce anIOthat repeatedly executes the originalIOuntil the predicate returns true when applied to the yielded value.classZip<A,B>Zip together twoIterables into a singleIterableofTuple2<A, B>. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn3
Classes in com.jnape.palatable.lambda.functions.builtin.fn3 that implement Monad Modifier and Type Class Description classBetween<A extends java.lang.Comparable<A>>Given two bounds and a value, return whether or not the value is greater than or equal to the lower bound and less than or equal to the upper bound.classBracket<A,B>Given anIOthat yields some typeA, a cleanup operation to run if a value of that type could be provisioned, and a kleisli arrow from that type to a newIOof typeB, produce anthat, when run, will provision theIO<B>A,flatMapit toB, and clean up the original value if it was produced in the first place.classClamp<A extends java.lang.Comparable<A>>Given two bounds and a value, "clamp" the value between the bounds via the following algorithm: - if the value is strictly less than the lower bound, return the lower bound - if the value is strictly greater than the upper bound, return the upper bound - otherwise, return the valueclassCmpEqBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeBand two values of typeA, returntrueif the first value is strictly equal to the second value (according toComparable.compareTo(Object)in terms of their mappedBresults; otherwise, return false.classCmpEqWith<A>Given aComparatorfrom some typeAand two values of typeA, returntrueif the first value is strictly equal to the second value (according toComparator.compare(Object, Object)otherwise, return false.classCompare<A>Given aComparatorfrom some typeAand two values of typeA, return aComparisonRelationof the first value with reference to the second value (according toComparator.compare(Object, Object).classFoldLeft<A,B>Given anIterableofAs, a starting valueB, and a, iteratively accumulate over theFn2<B, A, B>Iterable, ultimately returning a finalBvalue.classFoldRight<A,B>classGTBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeBand two values of typeA, returntrueif the second value is strictly greater than the first value in terms of their mappedBresults; otherwise, return false.classGTEBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeBand two values of typeA, returntrueif the second value is greater than or equal to the first value in terms of their mappedBresults according toComparable.compareTo(Object); otherwise, return false.classGTEWith<A>Given aComparatorfrom some typeAand two values of typeA, returntrueif the second value is greater than or equal to the first value in terms of their mappedBresults according toComparator.compare(Object, Object); otherwise, return false.classGTWith<A>Given aComparatorfrom some typeAand two values of typeA, returntrueif the second value is strictly greater than the first value in terms of their mappedBresults; otherwise, return false.classLiftA2<A,B,C,App extends Applicative<?,App>,AppC extends Applicative<C,App>>Lift into and apply anFn2to twoApplicativevalues, returning the result inside the sameApplicativecontext.classLTBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeBand two values of typeA, returntrueif the second value is strictly less than the first value in terms of their mappedBresults; otherwise, return false.classLTEBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeBand two values of typeA, returntrueif the second value is less than or equal to the first value in terms of their mappedBresults according toComparable.compareTo(Object); otherwise, return false.classLTEWith<A>Given aComparatorfrom some typeAand two values of typeA, returntrueif the second value is less than or equal to the first value in terms of their mappedBresults according toComparator.compare(Object, Object); otherwise, return false.classLTWith<A>Given a comparator for some typeAand two values of typeA, returntrueif the second value is strictly less than than the first value in terms of their mappedBresults; otherwise, return false.classScanLeft<A,B>Given anIterableofAs, a starting valueB, and a, iteratively accumulate over theFn2<B, A, B>Iterable, collecting each function application result, finally returning anIterableof all the results.classTimes<A>Given some number of timesnto invoke a functionA -> A, and given an inputA, iteratively apply the function to the input, and then to the result of the invocation, a total ofntimes, returning the result.classZipWith<A,B,C>Zip together twoIterables by applying a zipping function to the successive elements of eachIterableuntil one of them runs out of elements. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn4
Classes in com.jnape.palatable.lambda.functions.builtin.fn4 that implement Monad Modifier and Type Class Description classIfThenElse<A,B>classLiftA3<A,B,C,D,App extends Applicative<?,App>,AppD extends Applicative<D,App>>Lift into and apply anFn3to threeApplicativevalues, returning the result inside the sameApplicativecontext.classRateLimit<A> -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn5
Classes in com.jnape.palatable.lambda.functions.builtin.fn5 that implement Monad Modifier and Type Class Description classLiftA4<A,B,C,D,E,App extends Applicative<?,App>,AppE extends Applicative<E,App>>Lift into and apply anFn4to fourApplicativevalues, returning the result inside the sameApplicativecontext. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn6
Classes in com.jnape.palatable.lambda.functions.builtin.fn6 that implement Monad Modifier and Type Class Description classLiftA5<A,B,C,D,E,F,App extends Applicative<?,App>,AppF extends Applicative<F,App>>Lift into and apply anFn5to fiveApplicativevalues, returning the result inside the sameApplicativecontext. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn7
Classes in com.jnape.palatable.lambda.functions.builtin.fn7 that implement Monad Modifier and Type Class Description classLiftA6<A,B,C,D,E,F,G,App extends Applicative<?,App>,AppG extends Applicative<G,App>>Lift into and apply anFn6to sixApplicativevalues, returning the result inside the sameApplicativecontext. -
Uses of Monad in com.jnape.palatable.lambda.functions.builtin.fn8
Classes in com.jnape.palatable.lambda.functions.builtin.fn8 that implement Monad Modifier and Type Class Description classLiftA7<A,B,C,D,E,F,G,H,App extends Applicative<?,App>,AppH extends Applicative<H,App>>Lift into and apply anFn7to sevenApplicativevalues, returning the result inside the sameApplicativecontext. -
Uses of Monad in com.jnape.palatable.lambda.functions.recursion
Classes in com.jnape.palatable.lambda.functions.recursion that implement Monad Modifier and Type Class Description classRecursiveResult<A,B>SpecializedCoProduct2representing the possible results of a primitive recursive function.(package private) static classRecursiveResult.Recurse<A,B>(package private) static classRecursiveResult.Terminate<A,B>classTrampoline<A,B>Given an(analogous to "recurse" and "return" tail position instructions, respectively), produce aFn1<A,CoProduct2<A, B, ?>>that unrolls the original function by iteratively passing each result that matches the input (Fn1<A, B>A) back to the original function, and then terminating on and returning the first output (B).Method parameters in com.jnape.palatable.lambda.functions.recursion with type arguments of type Monad Modifier and Type Method Description <C> RecursiveResult<A,C>RecursiveResult. flatMap(Fn1<? super B,? extends Monad<C,RecursiveResult<A,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.functions.specialized
Classes in com.jnape.palatable.lambda.functions.specialized with type parameters of type Monad Modifier and Type Interface Description interfaceKleisli<A,B,M extends Monad<?,M>,MB extends Monad<B,M>>interfaceKleisli<A,B,M extends Monad<?,M>,MB extends Monad<B,M>>Subinterfaces of Monad in com.jnape.palatable.lambda.functions.specialized Modifier and Type Interface Description interfaceBiMonoidFactory<A,B,C>interfaceBiPredicate<A,B>interfaceBiSemigroupFactory<A,B,C>interfaceKleisli<A,B,M extends Monad<?,M>,MB extends Monad<B,M>>interfaceMonoidFactory<A,B>interfacePredicate<A>A specializedFn1that returns aBoolean.interfaceSemigroupFactory<A,B>Methods in com.jnape.palatable.lambda.functions.specialized with type parameters of type Monad Modifier and Type Method Description default <C,MC extends Monad<C,M>>
Kleisli<A,C,M,MC>Kleisli. andThen(Kleisli<B,C,M,MC> after)default <Z,MA extends Monad<A,M>>
Kleisli<Z,B,M,MB>Kleisli. compose(Kleisli<Z,A,M,MA> before)static <A,B,M extends Monad<?,M>,MB extends Monad<B,M>>
Kleisli<A,B,M,MB>Kleisli. kleisli(Fn1<? super A,? extends MB> fn)Adapt a compatible function into aKleisliarrow.static <A,B,M extends Monad<?,M>,MB extends Monad<B,M>>
Kleisli<A,B,M,MB>Kleisli. kleisli(Fn1<? super A,? extends MB> fn)Adapt a compatible function into aKleisliarrow. -
Uses of Monad in com.jnape.palatable.lambda.functor.builtin
Classes in com.jnape.palatable.lambda.functor.builtin that implement Monad Modifier and Type Class Description classConst<A,B>A (surprisingly useful) functor over some phantom typeB, retaining a value of typeAthat can be retrieved later.classIdentity<A>A functor over some value of typeAthat can be mapped over and retrieved later.classLazy<A>AMonadrepresenting a lazily-computed value.private static classLazy.Compose<A>private static classLazy.Later<A>classMarket<A,B,S,T>A profunctor used to extract the isomorphic functions aPrismis composed of.classState<S,A>The stateMonad, useful for iteratively building up state and state-contextualized result.classTagged<S,B>LikeConst, but the phantom parameter is in the contravariant position, and the value is in covariant position.classWriter<W,A>The lazy writer monad, a monad capturing some accumulation (eventually to be folded in terms of a given monoid) and a value.Method parameters in com.jnape.palatable.lambda.functor.builtin with type arguments of type Monad Modifier and Type Method Description <C> Const<A,C>Const. flatMap(Fn1<? super B,? extends Monad<C,Const<A,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> Identity<B>Identity. flatMap(Fn1<? super A,? extends Monad<B,Identity<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> Lazy<B>Lazy. flatMap(Fn1<? super A,? extends Monad<B,Lazy<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<U> Market<A,B,S,U>Market. flatMap(Fn1<? super T,? extends Monad<U,Market<A,B,S,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> State<S,B>State. flatMap(Fn1<? super A,? extends Monad<B,State<S,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<C> Tagged<S,C>Tagged. flatMap(Fn1<? super B,? extends Monad<C,Tagged<S,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> Writer<W,B>Writer. flatMap(Fn1<? super A,? extends Monad<B,Writer<W,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.io
Classes in com.jnape.palatable.lambda.io that implement Monad Modifier and Type Class Description classIO<A>AMonadrepresenting some side-effecting computation to be performed.private static classIO.Compose<A>Method parameters in com.jnape.palatable.lambda.io with type arguments of type Monad Modifier and Type Method Description IO<A>IO. catchError(Fn1<? super java.lang.Throwable,? extends Monad<A,IO<?>>> recoveryFn)<B> IO<B>IO. flatMap(Fn1<? super A,? extends Monad<B,IO<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.monad
Classes in com.jnape.palatable.lambda.monad with type parameters of type Monad Modifier and Type Interface Description interfaceMonad<A,M extends Monad<?,M>>Monads areApplicativefunctors that support a flattening operation to unwrapM<M<A>> -> M<A>.Subinterfaces of Monad in com.jnape.palatable.lambda.monad Modifier and Type Interface Description interfaceMonadError<E,A,M extends MonadError<E,?,M>>An interface formonadsthat can be interrupted with some type of error.interfaceMonadReader<R,A,MR extends MonadReader<R,?,MR>>A monad that is capable of reading an environmentRand producing a lifted valueA.interfaceMonadRec<A,M extends MonadRec<?,M>>A class ofmonadsthat offer a stack-safe interface for performing arbitrarily manyflatmap-likeoperations viaMonadRec.trampolineM(Fn1).interfaceMonadWriter<W,A,MW extends MonadWriter<W,?,MW>>AMonadthat is capable of writing and accumulating state alongside a value, but is not necessarily capable of simultaneously accessing the state and the value.Classes in com.jnape.palatable.lambda.monad that implement Monad Modifier and Type Class Description classSafeT<M extends MonadRec<?,M>,A>A stack-safemonad transformerthat can safely interpret deeply nested left- or right-associated binds for anyMonadRec.Methods in com.jnape.palatable.lambda.monad with type parameters of type Monad Modifier and Type Method Description static <M extends Monad<?,M>,A,MA extends Monad<A,M>>
MAMonad. join(Monad<? extends MA,M> mma)static <M extends Monad<?,M>,A,MA extends Monad<A,M>>
MAMonad. join(Monad<? extends MA,M> mma)Methods in com.jnape.palatable.lambda.monad that return Monad Modifier and Type Method Description default <B> Monad<B,M>Monad. discardL(Applicative<B,M> appB)Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.default <B> Monad<A,M>Monad. discardR(Applicative<B,M> appB)Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.<B> Monad<B,M>Monad. flatMap(Fn1<? super A,? extends Monad<B,M>> f)Chain dependent computations that may continue or short-circuit based on previous results.default <B> Monad<B,M>Monad. fmap(Fn1<? super A,? extends B> fn)Covariantly transmute this functor's parameter using the given mapping function.<B> Monad<B,M>Monad. pure(B b)Lift the valuebinto this applicative functor.default <B> Monad<B,M>Monad. zip(Applicative<Fn1<? super A,? extends B>,M> appFn)Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.monad that return types with arguments of type Monad Modifier and Type Method Description default <B> Lazy<? extends Monad<B,M>>Monad. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,M>> lazyAppFn)Given alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.monad with parameters of type Monad Modifier and Type Method Description static <M extends Monad<?,M>,A,MA extends Monad<A,M>>
MAMonad. join(Monad<? extends MA,M> mma)Method parameters in com.jnape.palatable.lambda.monad with type arguments of type Monad Modifier and Type Method Description MonadError<E,A,M>MonadError. catchError(Fn1<? super E,? extends Monad<A,M>> recoveryFn)<B> Monad<B,M>Monad. flatMap(Fn1<? super A,? extends Monad<B,M>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadError<E,B,M>MonadError. flatMap(Fn1<? super A,? extends Monad<B,M>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadReader<R,B,MR>MonadReader. flatMap(Fn1<? super A,? extends Monad<B,MR>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadRec<B,M>MonadRec. flatMap(Fn1<? super A,? extends Monad<B,M>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadWriter<W,B,MW>MonadWriter. flatMap(Fn1<? super A,? extends Monad<B,MW>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> SafeT<M,B>SafeT. flatMap(Fn1<? super A,? extends Monad<B,SafeT<M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.monad.transformer
Subinterfaces of Monad in com.jnape.palatable.lambda.monad.transformer Modifier and Type Interface Description interfaceMonadT<M extends MonadRec<?,M>,A,MT extends MonadT<M,?,MT,T>,T extends MonadT<?,?,?,T>>Method parameters in com.jnape.palatable.lambda.monad.transformer with type arguments of type Monad Modifier and Type Method Description <B> MonadT<M,B,MT,T>MonadT. flatMap(Fn1<? super A,? extends Monad<B,MT>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.monad.transformer.builtin
Classes in com.jnape.palatable.lambda.monad.transformer.builtin that implement Monad Modifier and Type Class Description classEitherT<M extends MonadRec<?,M>,L,R>Amonad transformerforEither.classIdentityT<M extends MonadRec<?,M>,A>Amonad transformerforIdentity.classIterateT<M extends MonadRec<?,M>,A>Amonad transformerover a co-inductive, singly-linked spine of values embedded in effects.classLazyT<M extends MonadRec<?,M>,A>Amonad transformerforLazy.classMaybeT<M extends MonadRec<?,M>,A>Amonad transformerforMaybe.classReaderT<R,M extends MonadRec<?,M>,A>classStateT<S,M extends MonadRec<?,M>,A>TheStatemonad transformer.classWriterT<W,M extends MonadRec<?,M>,A>Amonad transformerforWriter.Methods in com.jnape.palatable.lambda.monad.transformer.builtin with type parameters of type Monad Modifier and Type Method Description <MA extends Monad<A,M>>
MAStateT. evalT(S s)Run the stateful computation embedded in theMonad, returning the result.<MS extends Monad<S,M>>
MSStateT. execT(S s)Run the stateful computation embedded in theMonad, returning the final state.Method parameters in com.jnape.palatable.lambda.monad.transformer.builtin with type arguments of type Monad Modifier and Type Method Description EitherT<M,L,R>EitherT. catchError(Fn1<? super L,? extends Monad<R,EitherT<M,L,?>>> recoveryFn)MaybeT<M,A>MaybeT. catchError(Fn1<? super Unit,? extends Monad<A,MaybeT<M,?>>> recoveryFn)<R2> EitherT<M,L,R2>EitherT. flatMap(Fn1<? super R,? extends Monad<R2,EitherT<M,L,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> IdentityT<M,B>IdentityT. flatMap(Fn1<? super A,? extends Monad<B,IdentityT<M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> IterateT<M,B>IterateT. flatMap(Fn1<? super A,? extends Monad<B,IterateT<M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> LazyT<M,B>LazyT. flatMap(Fn1<? super A,? extends Monad<B,LazyT<M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> MaybeT<M,B>MaybeT. flatMap(Fn1<? super A,? extends Monad<B,MaybeT<M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> ReaderT<R,M,B>ReaderT. flatMap(Fn1<? super A,? extends Monad<B,ReaderT<R,M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> StateT<S,M,B>StateT. flatMap(Fn1<? super A,? extends Monad<B,StateT<S,M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.<B> WriterT<W,M,B>WriterT. flatMap(Fn1<? super A,? extends Monad<B,WriterT<W,M,?>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.monoid
Subinterfaces of Monad in com.jnape.palatable.lambda.monoid Modifier and Type Interface Description interfaceMonoid<A> -
Uses of Monad in com.jnape.palatable.lambda.monoid.builtin
Classes in com.jnape.palatable.lambda.monoid.builtin that implement Monad Modifier and Type Class Description classAddAll<A,C extends java.util.Collection<A>>TheMonoidinstance formed under mutative concatenation for an arbitraryCollection.classAndAMonoidinstance formed byBoolean.classCollapse<_1,_2>classCompose<A>classConcat<A>TheMonoidinstance formed under concatenation for an arbitraryIterable.classEndo<A>classEndoK<M extends MonadRec<?,M>,A,MA extends MonadRec<A,M>>The monoid formed under monadic endomorphism.classFirst<A>classJoinAMonoidinstance formed byStringthat concats two strings together.classLast<A>classLeftAll<L,R>classLeftAny<L,R>classMerge<L,R>AMonoidinstance formed byEither.merge(com.jnape.palatable.lambda.functions.Fn2<? super L, ? super L, ? extends L>, com.jnape.palatable.lambda.functions.Fn2<? super R, ? super R, ? extends R>, com.jnape.palatable.lambda.adt.Either<L, R>...), a semigroup overL, and a monoid overR.classMergeHMapsAMonoidinstance formed by mergingHMapsusing the chosenTypeSafeKey->Semigroupmappings, defaulting toLastin case noSemigrouphas been chosen for a givenTypeSafeKey.classMergeMaps<K,V>classOrAMonoidinstance formed byBoolean.classPresent<A>classPutAllclassRightAll<L,R>classRightAny<L,R>classRunAll<A>classTrivialclassUnion<A>classXorLogical exclusive-or. -
Uses of Monad in com.jnape.palatable.lambda.optics
Subinterfaces of Monad in com.jnape.palatable.lambda.optics Modifier and Type Interface Description interfaceIso<S,T,A,B>static interfaceIso.Simple<S,A>A convenience type with a simplified type signature for common isos with both unified "larger" values and unified "smaller" values.interfaceLens<S,T,A,B>An approximation of van Laarhoven lenses.static interfaceLens.Simple<S,A>A convenience type with a simplified type signature for common lenses with both unified "larger" values and unified "smaller" values.interfacePrism<S,T,A,B>Prisms areIsosthat can fail in one direction.static interfacePrism.Simple<S,A>A convenience type with a simplified type signature for commonprismwith unifiedS/TandA/Btypes.Method parameters in com.jnape.palatable.lambda.optics with type arguments of type Monad Modifier and Type Method Description default <U> Iso<S,U,A,B>Iso. flatMap(Fn1<? super T,? extends Monad<U,Iso<S,?,A,B>>> fn)Chain dependent computations that may continue or short-circuit based on previous results.default <U> Lens<S,U,A,B>Lens. flatMap(Fn1<? super T,? extends Monad<U,Lens<S,?,A,B>>> f)Chain dependent computations that may continue or short-circuit based on previous results.default <U> Prism<S,U,A,B>Prism. flatMap(Fn1<? super T,? extends Monad<U,Prism<S,?,A,B>>> f)Chain dependent computations that may continue or short-circuit based on previous results. -
Uses of Monad in com.jnape.palatable.lambda.optics.functions
Classes in com.jnape.palatable.lambda.optics.functions that implement Monad Modifier and Type Class Description classMatching<S,T,A,B>classOver<S,T,A,B>Given anOptic, a function fromAtoB, and a "larger" valueS, produce aTby retrieving theAfrom theS, applying the function, and updating theSwith theBresulting from the function.classPre<P extends Profunctor<?,?,? extends P>,S,T,A,B>classRe<S,T,A,B>Turn anOpticwith a unary mapping that can be used for setting (e.g.classSet<S,T,A,B>classUnder<S,T,A,B>classView<S,T,A,B> -
Uses of Monad in com.jnape.palatable.lambda.semigroup
Subinterfaces of Monad in com.jnape.palatable.lambda.semigroup Modifier and Type Interface Description interfaceSemigroup<A>ASemigroupis a closed, associative category. -
Uses of Monad in com.jnape.palatable.lambda.semigroup.builtin
Classes in com.jnape.palatable.lambda.semigroup.builtin that implement Monad Modifier and Type Class Description classAbsent<A>classCollapse<_1,_2>classCompose<A>classIntersection<A>Given twoIterablesxsandys, return thedistinctelements ofxsthat are also inysin order of their unique occurrence inxs.classLeftAll<L,R>classLeftAny<L,R>classMax<A extends java.lang.Comparable<A>>ASemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly less thany, returnyOtherwise, returnxclassMaxBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeB, produce aSemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly less thanyin terms ofB, returnyOtherwise, returnxclassMaxWith<A>Given a comparator for some typeA, produce aSemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly less thanyin terms ofB, returnyOtherwise, returnxclassMerge<L,R>classMin<A extends java.lang.Comparable<A>>ASemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly greater thany, returnyOtherwise, returnxclassMinBy<A,B extends java.lang.Comparable<B>>Given a mapping function from some typeAto someComparabletypeB, produce aSemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly greater thanyin terms ofB, returnyOtherwise, returnxclassMinWith<A>Given a comparator for some typeA, produce aSemigroupoverAthat chooses between two valuesxandyvia the following rules: Ifxis strictly greater thanyin terms ofB, returnyOtherwise, returnxclassRightAll<L,R>classRightAny<L,R>classRunAll<A> -
Uses of Monad in com.jnape.palatable.lambda.traversable
Classes in com.jnape.palatable.lambda.traversable that implement Monad Modifier and Type Class Description classLambdaIterable<A>Method parameters in com.jnape.palatable.lambda.traversable with type arguments of type Monad Modifier and Type Method Description <B> LambdaIterable<B>LambdaIterable. flatMap(Fn1<? super A,? extends Monad<B,LambdaIterable<?>>> f)Chain dependent computations that may continue or short-circuit based on previous results.
-