Uses of Interface
com.jnape.palatable.lambda.functions.Fn1
-
-
Uses of Fn1 in com.jnape.palatable.lambda.adt
Methods in com.jnape.palatable.lambda.adt with parameters of type Fn1 Modifier and Type Method Description <L2,R2>
Either<L2,R2>Either. biMap(Fn1<? super L,? extends L2> leftFn, Fn1<? super R,? extends R2> rightFn)
Dually map covariantly over both the left and right parameters.<C,D>
These<C,D>These. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<L2> Either<L2,R>
Either. biMapL(Fn1<? super L,? extends L2> fn)
Covariantly map over the left parameter.<Z> These<Z,B>
These. biMapL(Fn1<? super A,? extends Z> fn)
Covariantly map over the left parameter.<R2> Either<L,R2>
Either. biMapR(Fn1<? super R,? extends R2> fn)
Covariantly map over the right parameter.<C> These<A,C>
These. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.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)
Try<A>
Try. catching(Fn1<? super java.lang.Throwable,? extends java.lang.Boolean> predicate, Fn1<? super java.lang.Throwable,? extends A> recoveryFn)
Catch any thrownT
satisfyingpredicate
and map it to a success value.<S extends java.lang.Throwable>
Try<A>Try. catching(java.lang.Class<S> throwableType, Fn1<? super S,? extends A> recoveryFn)
Catch any instance ofthrowableType
and map it to a success value.Either<L,R>
Either. filter(Fn1<? super R,? extends java.lang.Boolean> pred, Fn0<L> leftFn0)
If this is a right value, applypred
to it.Either<L,R>
Either. filter(Fn1<? super R,? extends java.lang.Boolean> pred, Fn1<? super R,? extends L> leftFn)
If this is a right value, applypred
to it.Maybe<A>
Maybe. filter(Fn1<? super A,? extends java.lang.Boolean> predicate)
If this value is present and satisfiespredicate
, returnjust
the value; otherwise, returnnothing
.<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.<R2> Either<L,R2>
Either. fmap(Fn1<? super R,? extends R2> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> Maybe<B>
Maybe. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<C> These<A,C>
These. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> Try<B>
Try. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.L
Either. forfeit(Fn1<? super R,? extends L> forfeitFn)
Inverse of recover.java.lang.Throwable
Try. forfeit(Fn1<? super A,? extends java.lang.Throwable> fn)
If this is a failure, return the wrapped value.<V> V
Either.Left. match(Fn1<? super L,? extends V> leftFn, Fn1<? super R,? extends V> rightFn)
abstract <V> V
Either. match(Fn1<? super L,? extends V> leftFn, Fn1<? super R,? extends V> rightFn)
Given two mapping functions (one from anL
to aV
, one from anR
to aV
), unwrap the value stored in thisEither
, apply the appropriate mapping function, and return the result.<V> V
Either.Right. match(Fn1<? super L,? extends V> leftFn, Fn1<? super R,? extends V> rightFn)
<R> R
Maybe.Just. match(Fn1<? super Unit,? extends R> aFn, Fn1<? super A,? extends R> bFn)
<R> R
Maybe.Nothing. match(Fn1<? super Unit,? extends R> aFn, Fn1<? super A,? extends R> bFn)
<R> R
These._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super Tuple2<A,B>,? extends R> cFn)
<R> R
These._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super Tuple2<A,B>,? extends R> cFn)
<R> R
These.Both. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super Tuple2<A,B>,? extends R> cFn)
<R> R
Try.Failure. match(Fn1<? super java.lang.Throwable,? extends R> aFn, Fn1<? super A,? extends R> bFn)
<R> R
Try.Success. match(Fn1<? super java.lang.Throwable,? extends R> aFn, Fn1<? super A,? extends R> bFn)
<T extends java.lang.Throwable>
REither. orThrow(Fn1<? super L,? extends T> throwableFn)
Return the wrapped value if this is a right; otherwise, map the wrapped left value to aT
and throw it.<T extends java.lang.Throwable>
ATry.Failure. orThrow(Fn1<? super java.lang.Throwable,? extends T> fn)
abstract <T extends java.lang.Throwable>
ATry. orThrow(Fn1<? super java.lang.Throwable,? extends T> fn)
If this is a success value, return it.<T extends java.lang.Throwable>
ATry.Success. orThrow(Fn1<? super java.lang.Throwable,? extends T> fn)
Either<L,R>
Either. peek(Fn1<? super L,? extends IO<?>> leftEffect, Fn1<? super R,? extends IO<?>> rightEffect)
Either<L,R>
Either. peek(Fn1<? super R,? extends IO<?>> effect)
Maybe<A>
Maybe. peek(Fn1<? super A,? extends IO<?>> effect)
R
Either. recover(Fn1<? super L,? extends R> recoveryFn)
"Recover" from a left value by applying a recoveryFn to the wrapped value and returning it in the case of a left value; otherwise, return the wrapped right value.A
Try. recover(Fn1<? super java.lang.Throwable,? extends A> fn)
If this is a success, return the wrapped value.<L> Either<L,A>
Try. toEither(Fn1<? super java.lang.Throwable,? extends L> fn)
If this is a success, wrap the value in aEither.right(R)
and return it.<B> Either<L,B>
Either. trampolineM(Fn1<? super R,? extends MonadRec<RecursiveResult<R,B>,Either<L,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> Maybe<B>
Maybe. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,Maybe<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<C> These<A,C>
These. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,These<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> Try<B>
Try. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,Try<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<R2,App extends Applicative<?,App>,TravB extends Traversable<R2,Either<L,?>>,AppTrav extends Applicative<TravB,App>>
AppTravEither. traverse(Fn1<? super R,? extends Applicative<R2,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<B,App extends Applicative<?,App>,TravB extends Traversable<B,Maybe<?>>,AppTrav extends Applicative<TravB,App>>
AppTravMaybe. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
<C,App extends Applicative<?,App>,TravC extends Traversable<C,These<A,?>>,AppTrav extends Applicative<TravC,App>>
AppTravThese. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravC,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<B,App extends Applicative<?,App>,TravB extends Traversable<B,Try<?>>,AppTrav extends Applicative<TravB,App>>
AppTravTry. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.static <L,R>
Either<L,R>Either. trying(Fn0<? extends R> fn0, Fn1<? super java.lang.Throwable,? extends L> leftFn)
Attempt to execute theFn0
, returning its result in a right value.static <L> Either<L,Unit>
Either. trying(SideEffect sideEffect, Fn1<? super java.lang.Throwable,? extends L> leftFn)
Attempt to execute theSideEffect
, returningUnit
in a right value.static <A extends java.lang.AutoCloseable,B extends java.lang.AutoCloseable,C extends java.lang.AutoCloseable,D>
Try<D>Try. withResources(Fn0<? extends A> fn0, Fn1<? super A,? extends B> bFn, Fn1<? super B,? extends C> cFn, Fn1<? super C,? extends Try<? extends D>> fn)
Convenience overload ofwithResources
that cascades two dependent resource creations via nested calls.static <A extends java.lang.AutoCloseable,B extends java.lang.AutoCloseable,C>
Try<C>Try. withResources(Fn0<? extends A> fn0, Fn1<? super A,? extends B> bFn, Fn1<? super B,? extends Try<? extends C>> fn)
Convenience overload ofwithResources
that cascades dependent resource creation via nested calls.static <A extends java.lang.AutoCloseable,B>
Try<B>Try. withResources(Fn0<? extends A> fn0, Fn1<? super A,? extends Try<? extends B>> fn)
Method parameters in com.jnape.palatable.lambda.adt with type arguments of type Fn1 Modifier and Type Method Description <R2> Lazy<Either<L,R2>>
Either. lazyZip(Lazy<? extends Applicative<Fn1<? super R,? extends R2>,Either<L,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<Maybe<B>>
Maybe. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,Maybe<?>>> lazyAppFn)
Terminate early if this is aMaybe.Nothing
; otherwise, continue thezip
.<C> Lazy<These<A,C>>
These. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,These<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<Try<B>>
Try. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,Try<?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<R2> Either<L,R2>
Either. zip(Applicative<Fn1<? super R,? extends R2>,Either<L,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Maybe<B>
Maybe. zip(Applicative<Fn1<? super A,? extends B>,Maybe<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> These<A,C>
These. zip(Applicative<Fn1<? super B,? extends C>,These<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Try<B>
Try. zip(Applicative<Fn1<? super A,? extends B>,Try<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.adt.choice
Methods in com.jnape.palatable.lambda.adt.choice with parameters of type Fn1 Modifier and Type Method Description <C,D>
Choice2<C,D>Choice2. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<D,E>
Choice3<A,D,E>Choice3. biMap(Fn1<? super B,? extends D> lFn, Fn1<? super C,? extends E> rFn)
Dually map covariantly over both the left and right parameters.<E,F>
Choice4<A,B,E,F>Choice4. biMap(Fn1<? super C,? extends E> lFn, Fn1<? super D,? extends F> rFn)
<F,G>
Choice5<A,B,C,F,G>Choice5. biMap(Fn1<? super D,? extends F> lFn, Fn1<? super E,? extends G> rFn)
Dually map covariantly over both the left and right parameters.<G,H>
Choice6<A,B,C,D,G,H>Choice6. biMap(Fn1<? super E,? extends G> lFn, Fn1<? super F,? extends H> rFn)
Dually map covariantly over both the left and right parameters.<H,I>
Choice7<A,B,C,D,E,H,I>Choice7. biMap(Fn1<? super F,? extends H> lFn, Fn1<? super G,? extends I> rFn)
Dually map covariantly over both the left and right parameters.<I,J>
Choice8<A,B,C,D,E,F,I,J>Choice8. biMap(Fn1<? super G,? extends I> lFn, Fn1<? super H,? extends J> rFn)
Dually map covariantly over both the left and right parameters.<C> Choice2<C,B>
Choice2. biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.<D> Choice3<A,D,C>
Choice3. biMapL(Fn1<? super B,? extends D> fn)
Covariantly map over the left parameter.<E> Choice4<A,B,E,D>
Choice4. biMapL(Fn1<? super C,? extends E> fn)
Covariantly map over the left parameter.<F> Choice5<A,B,C,F,E>
Choice5. biMapL(Fn1<? super D,? extends F> fn)
Covariantly map over the left parameter.<G> Choice6<A,B,C,D,G,F>
Choice6. biMapL(Fn1<? super E,? extends G> fn)
Covariantly map over the left parameter.<H> Choice7<A,B,C,D,E,H,G>
Choice7. biMapL(Fn1<? super F,? extends H> fn)
Covariantly map over the left parameter.<I> Choice8<A,B,C,D,E,F,I,H>
Choice8. biMapL(Fn1<? super G,? extends I> fn)
Covariantly map over the left parameter.<C> Choice2<A,C>
Choice2. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.<D> Choice3<A,B,D>
Choice3. biMapR(Fn1<? super C,? extends D> fn)
Covariantly map over the right parameter.<E> Choice4<A,B,C,E>
Choice4. biMapR(Fn1<? super D,? extends E> fn)
Covariantly map over the right parameter.<F> Choice5<A,B,C,D,F>
Choice5. biMapR(Fn1<? super E,? extends F> fn)
Covariantly map over the right parameter.<G> Choice6<A,B,C,D,E,G>
Choice6. biMapR(Fn1<? super F,? extends G> fn)
Covariantly map over the right parameter.<H> Choice7<A,B,C,D,E,F,H>
Choice7. biMapR(Fn1<? super G,? extends H> fn)
Covariantly map over the right parameter.<I> Choice8<A,B,C,D,E,F,G,I>
Choice8. biMapR(Fn1<? super H,? extends I> fn)
Covariantly map over the right parameter.Choice2<A,B>
Choice3. converge(Fn1<? super C,? extends CoProduct2<A,B,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Choice3<A,B,C>
Choice4. converge(Fn1<? super D,? extends CoProduct3<A,B,C,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Choice4<A,B,C,D>
Choice5. converge(Fn1<? super E,? extends CoProduct4<A,B,C,D,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Choice5<A,B,C,D,E>
Choice6. converge(Fn1<? super F,? extends CoProduct5<A,B,C,D,E,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Choice6<A,B,C,D,E,F>
Choice7. converge(Fn1<? super G,? extends CoProduct6<A,B,C,D,E,F,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Choice7<A,B,C,D,E,F,G>
Choice8. converge(Fn1<? super H,? extends CoProduct7<A,B,C,D,E,F,G,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.<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.<C> Choice2<A,C>
Choice2. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.<D> Choice3<A,B,D>
Choice3. fmap(Fn1<? super C,? extends D> fn)
Covariantly transmute this functor's parameter using the given mapping function.<E> Choice4<A,B,C,E>
Choice4. fmap(Fn1<? super D,? extends E> fn)
Covariantly transmute this functor's parameter using the given mapping function.<F> Choice5<A,B,C,D,F>
Choice5. fmap(Fn1<? super E,? extends F> fn)
Covariantly transmute this functor's parameter using the given mapping function.<G> Choice6<A,B,C,D,E,G>
Choice6. fmap(Fn1<? super F,? extends G> fn)
Covariantly transmute this functor's parameter using the given mapping function.<H> Choice7<A,B,C,D,E,F,H>
Choice7. fmap(Fn1<? super G,? extends H> fn)
Covariantly transmute this functor's parameter using the given mapping function.<I> Choice8<A,B,C,D,E,F,G,I>
Choice8. fmap(Fn1<? super H,? extends I> fn)
Covariantly transmute this functor's parameter using the given mapping function.<R> R
Choice2._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
<R> R
Choice2._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
<R> R
Choice3._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn)
<R> R
Choice3._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn)
<R> R
Choice3._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn)
<R> R
Choice4._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn)
<R> R
Choice4._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn)
<R> R
Choice4._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn)
<R> R
Choice4._D. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn)
<R> R
Choice5._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
<R> R
Choice5._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
<R> R
Choice5._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
<R> R
Choice5._D. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
<R> R
Choice5._E. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
<R> R
Choice6._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice6._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice6._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice6._D. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice6._E. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice6._F. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
<R> R
Choice7._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._D. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._E. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._F. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice7._G. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
<R> R
Choice8._A. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._B. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._C. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._D. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._E. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._F. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._G. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<R> R
Choice8._H. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
<C> Choice2<A,C>
Choice2. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Choice2<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<D> Choice3<A,B,D>
Choice3. trampolineM(Fn1<? super C,? extends MonadRec<RecursiveResult<C,D>,Choice3<A,B,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<E> Choice4<A,B,C,E>
Choice4. trampolineM(Fn1<? super D,? extends MonadRec<RecursiveResult<D,E>,Choice4<A,B,C,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<F> Choice5<A,B,C,D,F>
Choice5. trampolineM(Fn1<? super E,? extends MonadRec<RecursiveResult<E,F>,Choice5<A,B,C,D,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<G> Choice6<A,B,C,D,E,G>
Choice6. trampolineM(Fn1<? super F,? extends MonadRec<RecursiveResult<F,G>,Choice6<A,B,C,D,E,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<H> Choice7<A,B,C,D,E,F,H>
Choice7. trampolineM(Fn1<? super G,? extends MonadRec<RecursiveResult<G,H>,Choice7<A,B,C,D,E,F,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<I> Choice8<A,B,C,D,E,F,G,I>
Choice8. trampolineM(Fn1<? super H,? extends MonadRec<RecursiveResult<H,I>,Choice8<A,B,C,D,E,F,G,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<C,App extends Applicative<?,App>,TravB extends Traversable<C,Choice2<A,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice2. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<D,App extends Applicative<?,App>,TravB extends Traversable<D,Choice3<A,B,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice3. traverse(Fn1<? super C,? extends Applicative<D,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<E,App extends Applicative<?,App>,TravB extends Traversable<E,Choice4<A,B,C,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice4. traverse(Fn1<? super D,? extends Applicative<E,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<F,App extends Applicative<?,App>,TravB extends Traversable<F,Choice5<A,B,C,D,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice5. traverse(Fn1<? super E,? extends Applicative<F,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<G,App extends Applicative<?,App>,TravB extends Traversable<G,Choice6<A,B,C,D,E,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice6. traverse(Fn1<? super F,? extends Applicative<G,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<H,App extends Applicative<?,App>,TravB extends Traversable<H,Choice7<A,B,C,D,E,F,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice7. traverse(Fn1<? super G,? extends Applicative<H,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<I,App extends Applicative<?,App>,TravB extends Traversable<I,Choice8<A,B,C,D,E,F,G,?>>,AppTrav extends Applicative<TravB,App>>
AppTravChoice8. traverse(Fn1<? super H,? extends Applicative<I,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.Method parameters in com.jnape.palatable.lambda.adt.choice with type arguments of type Fn1 Modifier and Type Method Description <C> Lazy<Choice2<A,C>>
Choice2. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Choice2<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<D> Lazy<Choice3<A,B,D>>
Choice3. lazyZip(Lazy<? extends Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<E> Lazy<Choice4<A,B,C,E>>
Choice4. lazyZip(Lazy<? extends Applicative<Fn1<? super D,? extends E>,Choice4<A,B,C,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<F> Lazy<Choice5<A,B,C,D,F>>
Choice5. lazyZip(Lazy<? extends Applicative<Fn1<? super E,? extends F>,Choice5<A,B,C,D,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<G> Lazy<Choice6<A,B,C,D,E,G>>
Choice6. lazyZip(Lazy<? extends Applicative<Fn1<? super F,? extends G>,Choice6<A,B,C,D,E,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<H> Lazy<Choice7<A,B,C,D,E,F,H>>
Choice7. lazyZip(Lazy<? extends Applicative<Fn1<? super G,? extends H>,Choice7<A,B,C,D,E,F,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<I> Lazy<Choice8<A,B,C,D,E,F,G,I>>
Choice8. lazyZip(Lazy<? extends Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> Choice2<A,C>
Choice2. zip(Applicative<Fn1<? super B,? extends C>,Choice2<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<D> Choice3<A,B,D>
Choice3. zip(Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<E> Choice4<A,B,C,E>
Choice4. zip(Applicative<Fn1<? super D,? extends E>,Choice4<A,B,C,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<F> Choice5<A,B,C,D,F>
Choice5. zip(Applicative<Fn1<? super E,? extends F>,Choice5<A,B,C,D,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<G> Choice6<A,B,C,D,E,G>
Choice6. zip(Applicative<Fn1<? super F,? extends G>,Choice6<A,B,C,D,E,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<H> Choice7<A,B,C,D,E,F,H>
Choice7. zip(Applicative<Fn1<? super G,? extends H>,Choice7<A,B,C,D,E,F,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<I> Choice8<A,B,C,D,E,F,G,I>
Choice8. zip(Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.adt.coproduct
Methods in com.jnape.palatable.lambda.adt.coproduct with parameters of type Fn1 Modifier and Type Method Description default CoProduct2<A,B,? extends CoProduct2<A,B,?>>
CoProduct3. converge(Fn1<? super C,? extends CoProduct2<A,B,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default CoProduct3<A,B,C,? extends CoProduct3<A,B,C,?>>
CoProduct4. converge(Fn1<? super D,? extends CoProduct3<A,B,C,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default CoProduct4<A,B,C,D,? extends CoProduct4<A,B,C,D,?>>
CoProduct5. converge(Fn1<? super E,? extends CoProduct4<A,B,C,D,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default CoProduct5<A,B,C,D,E,? extends CoProduct5<A,B,C,D,E,?>>
CoProduct6. converge(Fn1<? super F,? extends CoProduct5<A,B,C,D,E,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default CoProduct6<A,B,C,D,E,F,? extends CoProduct6<A,B,C,D,E,F,?>>
CoProduct7. converge(Fn1<? super G,? extends CoProduct6<A,B,C,D,E,F,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default CoProduct7<A,B,C,D,E,F,G,? extends CoProduct7<A,B,C,D,E,F,G,?>>
CoProduct8. converge(Fn1<? super H,? extends CoProduct7<A,B,C,D,E,F,G,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default <R> R
CoProduct2. embed(Fn1<? super CP2,? extends R> aFn, Fn1<? super CP2,? extends R> bFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct3. embed(Fn1<? super CP3,? extends R> aFn, Fn1<? super CP3,? extends R> bFn, Fn1<? super CP3,? extends R> cFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct4. embed(Fn1<? super CP4,? extends R> aFn, Fn1<? super CP4,? extends R> bFn, Fn1<? super CP4,? extends R> cFn, Fn1<? super CP4,? extends R> dFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct5. embed(Fn1<? super CP5,? extends R> aFn, Fn1<? super CP5,? extends R> bFn, Fn1<? super CP5,? extends R> cFn, Fn1<? super CP5,? extends R> dFn, Fn1<? super CP5,? extends R> eFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct6. embed(Fn1<? super CP6,? extends R> aFn, Fn1<? super CP6,? extends R> bFn, Fn1<? super CP6,? extends R> cFn, Fn1<? super CP6,? extends R> dFn, Fn1<? super CP6,? extends R> eFn, Fn1<? super CP6,? extends R> fFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct7. embed(Fn1<? super CP7,? extends R> aFn, Fn1<? super CP7,? extends R> bFn, Fn1<? super CP7,? extends R> cFn, Fn1<? super CP7,? extends R> dFn, Fn1<? super CP7,? extends R> eFn, Fn1<? super CP7,? extends R> fFn, Fn1<? super CP7,? extends R> gFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.default <R> R
CoProduct8. embed(Fn1<? super CP8,? extends R> aFn, Fn1<? super CP8,? extends R> bFn, Fn1<? super CP8,? extends R> cFn, Fn1<? super CP8,? extends R> dFn, Fn1<? super CP8,? extends R> eFn, Fn1<? super CP8,? extends R> fFn, Fn1<? super CP8,? extends R> gFn, Fn1<? super CP8,? extends R> hFn)
Embed this coproduct inside another value; that is, given morphisms from this coproduct toR
, apply the appropriate morphism to this coproduct as a whole.<R> R
CoProduct2. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct3. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct4. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct5. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct6. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct7. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn)
Type-safe convergence requiring a match against all potential types.<R> R
CoProduct8. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn, Fn1<? super C,? extends R> cFn, Fn1<? super D,? extends R> dFn, Fn1<? super E,? extends R> eFn, Fn1<? super F,? extends R> fFn, Fn1<? super G,? extends R> gFn, Fn1<? super H,? extends R> hFn)
Type-safe convergence requiring a match against all potential types. -
Uses of Fn1 in com.jnape.palatable.lambda.adt.hlist
Methods in com.jnape.palatable.lambda.adt.hlist with parameters of type Fn1 Modifier and Type Method Description <_1Prime,_2Prime>
Tuple2<_1Prime,_2Prime>Tuple2. biMap(Fn1<? super _1,? extends _1Prime> lFn, Fn1<? super _2,? extends _2Prime> rFn)
Dually map covariantly over both the left and right parameters.<_2Prime,_3Prime>
Tuple3<_1,_2Prime,_3Prime>Tuple3. biMap(Fn1<? super _2,? extends _2Prime> lFn, Fn1<? super _3,? extends _3Prime> rFn)
Dually map covariantly over both the left and right parameters.<_3Prime,_4Prime>
Tuple4<_1,_2,_3Prime,_4Prime>Tuple4. biMap(Fn1<? super _3,? extends _3Prime> lFn, Fn1<? super _4,? extends _4Prime> rFn)
Dually map covariantly over both the left and right parameters.<_4Prime,_5Prime>
Tuple5<_1,_2,_3,_4Prime,_5Prime>Tuple5. biMap(Fn1<? super _4,? extends _4Prime> lFn, Fn1<? super _5,? extends _5Prime> rFn)
Dually map covariantly over both the left and right parameters.<_5Prime,_6Prime>
Tuple6<_1,_2,_3,_4,_5Prime,_6Prime>Tuple6. biMap(Fn1<? super _5,? extends _5Prime> lFn, Fn1<? super _6,? extends _6Prime> rFn)
Dually map covariantly over both the left and right parameters.<_6Prime,_7Prime>
Tuple7<_1,_2,_3,_4,_5,_6Prime,_7Prime>Tuple7. biMap(Fn1<? super _6,? extends _6Prime> lFn, Fn1<? super _7,? extends _7Prime> rFn)
Dually map covariantly over both the left and right parameters.<_7Prime,_8Prime>
Tuple8<_1,_2,_3,_4,_5,_6,_7Prime,_8Prime>Tuple8. biMap(Fn1<? super _7,? extends _7Prime> lFn, Fn1<? super _8,? extends _8Prime> rFn)
Dually map covariantly over both the left and right parameters.<_1Prime> Tuple2<_1Prime,_2>
Tuple2. biMapL(Fn1<? super _1,? extends _1Prime> fn)
Covariantly map over the left parameter.<_2Prime> Tuple3<_1,_2Prime,_3>
Tuple3. biMapL(Fn1<? super _2,? extends _2Prime> fn)
Covariantly map over the left parameter.<_3Prime> Tuple4<_1,_2,_3Prime,_4>
Tuple4. biMapL(Fn1<? super _3,? extends _3Prime> fn)
Covariantly map over the left parameter.<_4Prime> Tuple5<_1,_2,_3,_4Prime,_5>
Tuple5. biMapL(Fn1<? super _4,? extends _4Prime> fn)
Covariantly map over the left parameter.<_5Prime> Tuple6<_1,_2,_3,_4,_5Prime,_6>
Tuple6. biMapL(Fn1<? super _5,? extends _5Prime> fn)
Covariantly map over the left parameter.<_6Prime> Tuple7<_1,_2,_3,_4,_5,_6Prime,_7>
Tuple7. biMapL(Fn1<? super _6,? extends _6Prime> fn)
Covariantly map over the left parameter.<_7Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7Prime,_8>
Tuple8. biMapL(Fn1<? super _7,? extends _7Prime> fn)
Covariantly map over the left parameter.<_2Prime> Tuple2<_1,_2Prime>
Tuple2. biMapR(Fn1<? super _2,? extends _2Prime> fn)
Covariantly map over the right parameter.<_3Prime> Tuple3<_1,_2,_3Prime>
Tuple3. biMapR(Fn1<? super _3,? extends _3Prime> fn)
Covariantly map over the right parameter.<_4Prime> Tuple4<_1,_2,_3,_4Prime>
Tuple4. biMapR(Fn1<? super _4,? extends _4Prime> fn)
Covariantly map over the right parameter.<_5Prime> Tuple5<_1,_2,_3,_4,_5Prime>
Tuple5. biMapR(Fn1<? super _5,? extends _5Prime> fn)
Covariantly map over the right parameter.<_6Prime> Tuple6<_1,_2,_3,_4,_5,_6Prime>
Tuple6. biMapR(Fn1<? super _6,? extends _6Prime> fn)
Covariantly map over the right parameter.<_7Prime> Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>
Tuple7. biMapR(Fn1<? super _7,? extends _7Prime> fn)
Covariantly map over the right parameter.<_8Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>
Tuple8. biMapR(Fn1<? super _8,? extends _8Prime> fn)
Covariantly map over the right parameter.Tuple2<_1,_2>
Tuple2. censor(Fn1<? super _1,? extends _1> fn)
Update the accumulated state.<_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.<_1Prime> SingletonHList<_1Prime>
SingletonHList. fmap(Fn1<? super _1,? extends _1Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_2Prime> Tuple2<_1,_2Prime>
Tuple2. fmap(Fn1<? super _2,? extends _2Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_3Prime> Tuple3<_1,_2,_3Prime>
Tuple3. fmap(Fn1<? super _3,? extends _3Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_4Prime> Tuple4<_1,_2,_3,_4Prime>
Tuple4. fmap(Fn1<? super _4,? extends _4Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_5Prime> Tuple5<_1,_2,_3,_4,_5Prime>
Tuple5. fmap(Fn1<? super _5,? extends _5Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_6Prime> Tuple6<_1,_2,_3,_4,_5,_6Prime>
Tuple6. fmap(Fn1<? super _6,? extends _6Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_7Prime> Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>
Tuple7. fmap(Fn1<? super _7,? extends _7Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<_8Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>
Tuple8. fmap(Fn1<? super _8,? extends _8Prime> fn)
Covariantly transmute this functor's parameter using the given mapping function.<R> R
SingletonHList. into(Fn1<? super _1,? extends R> fn)
ApplyHList.HCons.head()
tofn
and return the result.<_3> Tuple2<_1,Tuple2<_2,_3>>
Tuple2. listens(Fn1<? super _1,? extends _3> fn)
Map the accumulation into a value and pair it with the current output.<_1Prime> SingletonHList<_1Prime>
SingletonHList. trampolineM(Fn1<? super _1,? extends MonadRec<RecursiveResult<_1,_1Prime>,SingletonHList<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_2Prime> Tuple2<_1,_2Prime>
Tuple2. trampolineM(Fn1<? super _2,? extends MonadRec<RecursiveResult<_2,_2Prime>,Tuple2<_1,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_3Prime> Tuple3<_1,_2,_3Prime>
Tuple3. trampolineM(Fn1<? super _3,? extends MonadRec<RecursiveResult<_3,_3Prime>,Tuple3<_1,_2,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_4Prime> Tuple4<_1,_2,_3,_4Prime>
Tuple4. trampolineM(Fn1<? super _4,? extends MonadRec<RecursiveResult<_4,_4Prime>,Tuple4<_1,_2,_3,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_5Prime> Tuple5<_1,_2,_3,_4,_5Prime>
Tuple5. trampolineM(Fn1<? super _5,? extends MonadRec<RecursiveResult<_5,_5Prime>,Tuple5<_1,_2,_3,_4,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_6Prime> Tuple6<_1,_2,_3,_4,_5,_6Prime>
Tuple6. trampolineM(Fn1<? super _6,? extends MonadRec<RecursiveResult<_6,_6Prime>,Tuple6<_1,_2,_3,_4,_5,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_7Prime> Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>
Tuple7. trampolineM(Fn1<? super _7,? extends MonadRec<RecursiveResult<_7,_7Prime>,Tuple7<_1,_2,_3,_4,_5,_6,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<_8Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>
Tuple8. trampolineM(Fn1<? super _8,? extends MonadRec<RecursiveResult<_8,_8Prime>,Tuple8<_1,_2,_3,_4,_5,_6,_7,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B,App extends Applicative<?,App>,TravB extends Traversable<B,SingletonHList<?>>,AppTrav extends Applicative<TravB,App>>
AppTravSingletonHList. traverse(Fn1<? super _1,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_2Prime,App extends Applicative<?,App>,TravB extends Traversable<_2Prime,Tuple2<_1,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple2. traverse(Fn1<? super _2,? extends Applicative<_2Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_3Prime,App extends Applicative<?,App>,TravB extends Traversable<_3Prime,Tuple3<_1,_2,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple3. traverse(Fn1<? super _3,? extends Applicative<_3Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_4Prime,App extends Applicative<?,App>,TravB extends Traversable<_4Prime,Tuple4<_1,_2,_3,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple4. traverse(Fn1<? super _4,? extends Applicative<_4Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_5Prime,App extends Applicative<?,App>,TravB extends Traversable<_5Prime,Tuple5<_1,_2,_3,_4,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple5. traverse(Fn1<? super _5,? extends Applicative<_5Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_6Prime,App extends Applicative<?,App>,TravB extends Traversable<_6Prime,Tuple6<_1,_2,_3,_4,_5,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple6. traverse(Fn1<? super _6,? extends Applicative<_6Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_7Prime,App extends Applicative<?,App>,TravB extends Traversable<_7Prime,Tuple7<_1,_2,_3,_4,_5,_6,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple7. traverse(Fn1<? super _7,? extends Applicative<_7Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<_8Prime,App extends Applicative<?,App>,TravB extends Traversable<_8Prime,Tuple8<_1,_2,_3,_4,_5,_6,_7,?>>,AppTrav extends Applicative<TravB,App>>
AppTravTuple8. traverse(Fn1<? super _8,? extends Applicative<_8Prime,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.Method parameters in com.jnape.palatable.lambda.adt.hlist with type arguments of type Fn1 Modifier and Type Method Description <_1Prime> Lazy<SingletonHList<_1Prime>>
SingletonHList. lazyZip(Lazy<? extends Applicative<Fn1<? super _1,? extends _1Prime>,SingletonHList<?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_2Prime> Lazy<Tuple2<_1,_2Prime>>
Tuple2. lazyZip(Lazy<? extends Applicative<Fn1<? super _2,? extends _2Prime>,Tuple2<_1,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_3Prime> Lazy<Tuple3<_1,_2,_3Prime>>
Tuple3. lazyZip(Lazy<? extends Applicative<Fn1<? super _3,? extends _3Prime>,Tuple3<_1,_2,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_4Prime> Lazy<Tuple4<_1,_2,_3,_4Prime>>
Tuple4. lazyZip(Lazy<? extends Applicative<Fn1<? super _4,? extends _4Prime>,Tuple4<_1,_2,_3,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_5Prime> Lazy<Tuple5<_1,_2,_3,_4,_5Prime>>
Tuple5. lazyZip(Lazy<? extends Applicative<Fn1<? super _5,? extends _5Prime>,Tuple5<_1,_2,_3,_4,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_6Prime> Lazy<Tuple6<_1,_2,_3,_4,_5,_6Prime>>
Tuple6. lazyZip(Lazy<? extends Applicative<Fn1<? super _6,? extends _6Prime>,Tuple6<_1,_2,_3,_4,_5,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_7Prime> Lazy<Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>>
Tuple7. lazyZip(Lazy<? extends Applicative<Fn1<? super _7,? extends _7Prime>,Tuple7<_1,_2,_3,_4,_5,_6,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_8Prime> Lazy<Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>>
Tuple8. lazyZip(Lazy<? extends Applicative<Fn1<? super _8,? extends _8Prime>,Tuple8<_1,_2,_3,_4,_5,_6,_7,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_1Prime> SingletonHList<_1Prime>
SingletonHList. zip(Applicative<Fn1<? super _1,? extends _1Prime>,SingletonHList<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_2Prime> Tuple2<_1,_2Prime>
Tuple2. zip(Applicative<Fn1<? super _2,? extends _2Prime>,Tuple2<_1,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_3Prime> Tuple3<_1,_2,_3Prime>
Tuple3. zip(Applicative<Fn1<? super _3,? extends _3Prime>,Tuple3<_1,_2,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_4Prime> Tuple4<_1,_2,_3,_4Prime>
Tuple4. zip(Applicative<Fn1<? super _4,? extends _4Prime>,Tuple4<_1,_2,_3,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_5Prime> Tuple5<_1,_2,_3,_4,_5Prime>
Tuple5. zip(Applicative<Fn1<? super _5,? extends _5Prime>,Tuple5<_1,_2,_3,_4,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_6Prime> Tuple6<_1,_2,_3,_4,_5,_6Prime>
Tuple6. zip(Applicative<Fn1<? super _6,? extends _6Prime>,Tuple6<_1,_2,_3,_4,_5,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_7Prime> Tuple7<_1,_2,_3,_4,_5,_6,_7Prime>
Tuple7. zip(Applicative<Fn1<? super _7,? extends _7Prime>,Tuple7<_1,_2,_3,_4,_5,_6,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<_8Prime> Tuple8<_1,_2,_3,_4,_5,_6,_7,_8Prime>
Tuple8. zip(Applicative<Fn1<? super _8,? extends _8Prime>,Tuple8<_1,_2,_3,_4,_5,_6,_7,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.functions
Subinterfaces of Fn1 in com.jnape.palatable.lambda.functions Modifier and Type Interface Description interface
Effect<A>
A function returning "no result", and therefore only useful as a side-effect.interface
Fn0<A>
interface
Fn2<A,B,C>
A function taking two arguments.interface
Fn3<A,B,C,D>
A function taking three arguments.interface
Fn4<A,B,C,D,E>
A function taking four arguments.interface
Fn5<A,B,C,D,E,F>
A function taking five arguments.interface
Fn6<A,B,C,D,E,F,G>
A function taking six arguments.interface
Fn7<A,B,C,D,E,F,G,H>
A function taking seven arguments.interface
Fn8<A,B,C,D,E,F,G,H,I>
A function taking eight arguments.Methods in com.jnape.palatable.lambda.functions that return Fn1 Modifier and Type Method Description default Fn1<B,C>
Fn2. apply(A a)
Partially apply this function by passing its first argument.default Fn1<C,D>
Fn3. apply(A a, B b)
Partially apply this function by taking its first two arguments.default Fn1<D,E>
Fn4. apply(A a, B b, C c)
Partially apply this function by taking its first three arguments.default Fn1<E,F>
Fn5. apply(A a, B b, C c, D d)
Partially apply this function by taking its first four arguments.default Fn1<F,G>
Fn6. apply(A a, B b, C c, D d, E e)
Partially apply this function by taking its first five arguments.default Fn1<G,H>
Fn7. apply(A a, B b, C c, D d, E e, F f)
Partially apply this function by taking its first six arguments.default Fn1<H,I>
Fn8. apply(A a, B b, C c, D d, E e, F f, G g)
Partially apply this function by taking its first seven arguments.default Fn1<A,Tuple2<A,B>>
Fn1. carry()
Pair the covariantly-positioned carrier type with the contravariantly-positioned carrier type.default <C> Fn1<Tuple2<C,A>,Tuple2<C,B>>
Fn1. cartesian()
Pair a value with the input to this function, and preserve the paired value through to the output.default Fn1<A,B>
Fn1. censor(Fn1<? super A,? extends A> fn)
Update the accumulated state.default Fn1<B,C>
Fn2. checkedApply(A a)
Invoke this function with the given argument, potentially throwing anyThrowable
.default Fn1<C,D>
Fn3. checkedApply(A a, B b)
default Fn1<D,E>
Fn4. checkedApply(A a, B b, C c)
default Fn1<E,F>
Fn5. checkedApply(A a, B b, C c, D d)
default Fn1<F,G>
Fn6. checkedApply(A a, B b, C c, D d, E e)
default Fn1<G,H>
Fn7. checkedApply(A a, B b, C c, D d, E e, F f)
default Fn1<H,I>
Fn8. checkedApply(A a, B b, C c, D d, E e, F f, G g)
default Fn1<A,Choice2<A,B>>
Fn1. choose()
Choose between a successful resultb
or returning back the input,a
.default <C> Fn1<Choice2<C,A>,Choice2<C,B>>
Fn1. cocartesian()
Choose between either applying this function or returning back a different result altogether.default <Z> Fn1<Z,B>
Fn1. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z,C>
Fn1<Z,C>Fn1. diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
Exercise bothdiMapL
anddiMapR
over this function in the same invocation.default <Z> Fn1<Z,B>
Fn1. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <C> Fn1<A,C>
Fn1. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the return value of this function, producing a function that takes the same argument, and produces the new result type.default <C> Fn1<A,C>
Fn1. discardL(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <C> Fn1<A,B>
Fn1. discardR(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.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.default <C> Fn1<A,C>
Fn1. fmap(Fn1<? super B,? extends C> f)
Left-to-right composition.static <A,B>
Fn1<A,B>Fn1. fn1(Fn1<? super A,? extends B> fn)
Static factory method for avoid explicit casting when using method references asFn1
s.static <A,B>
Fn1<A,B>Fn1. fromFunction(java.util.function.Function<? super A,? extends B> function)
Static factory method for wrapping a javaFunction
in anFn1
.default <C> Fn1<A,Tuple2<B,C>>
Fn1. listens(Fn1<? super A,? extends C> fn)
Map the accumulation into a value and pair it with the current output.default Fn1<A,B>
Fn1. local(Fn1<? super A,? extends A> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.default <C> Fn1<A,C>
Fn1. pure(C c)
Lift the valueb
into this applicative functor.default Fn1<A,B>
Fn1. self()
default <C> Fn1<A,C>
Fn1. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Fn1<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default Fn1<? super Product2<? extends A,? extends B>,C>
Fn2. uncurry()
static <A,B>
Fn1<A,B>Fn1. withSelf(Fn2<? super Fn1<? super A,? extends B>,? super A,? extends B> fn)
Construct anFn1
that has a reference to itself in scope at the time it is executed (presumably for recursive invocations).default <C> Fn1<A,C>
Fn1. zip(Fn2<A,B,C> appFn)
default <C> Fn1<A,C>
Fn1. zip(Applicative<Fn1<? super B,? extends C>,Fn1<A,?>> 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.functions that return types with arguments of type Fn1 Modifier and Type Method Description default <Y,Z>
Fn8<Y,Z,B,C,D,E,F,G,Fn1<H,I>>Fn8. compose(Fn2<? super Y,? super Z,? extends A> before)
default <C> Lazy<Fn1<A,C>>
Fn1. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Fn1<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.static <A> Pure<Fn1<A,?>>
Fn1. pureFn1()
Methods in com.jnape.palatable.lambda.functions with parameters of type Fn1 Modifier and Type Method Description default Fn1<A,B>
Fn1. censor(Fn1<? super A,? extends A> fn)
Update the accumulated state.default <Z> Effect<Z>
Effect. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Fn1<Z,B>
Fn1. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Fn2<Z,B,C>
Fn2. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Fn3<Z,B,C,D>
Fn3. contraMap(Fn1<? super Z,? extends A> fn)
default <Z> Fn4<Z,B,C,D,E>
Fn4. contraMap(Fn1<? super Z,? extends A> fn)
default <Z> Fn5<Z,B,C,D,E,F>
Fn5. contraMap(Fn1<? super Z,? extends A> fn)
default <Z> Fn6<Z,B,C,D,E,F,G>
Fn6. contraMap(Fn1<? super Z,? extends A> fn)
default <Z> Fn7<Z,B,C,D,E,F,G,H>
Fn7. contraMap(Fn1<? super Z,? extends A> fn)
default <Z> Fn8<Z,B,C,D,E,F,G,H,I>
Fn8. contraMap(Fn1<? super Z,? extends A> fn)
static <A,B,C>
Fn2<A,B,C>Fn2. curried(Fn1<A,Fn1<B,C>> curriedFn1)
static <A,B,C>
Fn2<A,B,C>Fn2. curry(Fn1<? super Tuple2<A,B>,? extends C> uncurriedFn1)
default <Z,C>
Fn1<Z,C>Fn1. diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
Exercise bothdiMapL
anddiMapR
over this function in the same invocation.default <Z> Effect<Z>
Effect. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <Z> Fn1<Z,B>
Fn1. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <Z> Fn2<Z,B,C>
Fn2. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <Z> Fn3<Z,B,C,D>
Fn3. diMapL(Fn1<? super Z,? extends A> fn)
default <Z> Fn4<Z,B,C,D,E>
Fn4. diMapL(Fn1<? super Z,? extends A> fn)
default <Z> Fn5<Z,B,C,D,E,F>
Fn5. diMapL(Fn1<? super Z,? extends A> fn)
default <Z> Fn6<Z,B,C,D,E,F,G>
Fn6. diMapL(Fn1<? super Z,? extends A> fn)
default <Z> Fn7<Z,B,C,D,E,F,G,H>
Fn7. diMapL(Fn1<? super Z,? extends A> fn)
default <Z> Fn8<Z,B,C,D,E,F,G,H,I>
Fn8. diMapL(Fn1<? super Z,? extends A> fn)
default <B> Fn0<B>
Fn0. diMapR(Fn1<? super A,? extends B> fn)
default <C> Fn1<A,C>
Fn1. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the return value of this function, producing a function that takes the same argument, and produces the new result type.static <A> Effect<A>
Effect. effect(Fn1<? super A,? extends IO<?>> fn)
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.default <B> Fn0<B>
Fn0. fmap(Fn1<? super A,? extends B> f)
default <C> Fn1<A,C>
Fn1. fmap(Fn1<? super B,? extends C> f)
Left-to-right composition.static <A> Fn0<A>
Fn0. fn0(Fn1<Unit,A> fn)
static <A,B>
Fn1<A,B>Fn1. fn1(Fn1<? super A,? extends B> fn)
Static factory method for avoid explicit casting when using method references asFn1
s.static <A,B,C,D>
Fn3<A,B,C,D>Fn3. fn3(Fn1<A,Fn2<B,C,D>> curriedFn1)
static <A,B,C,D,E>
Fn4<A,B,C,D,E>Fn4. fn4(Fn1<A,Fn3<B,C,D,E>> curriedFn1)
static <A,B,C,D,E,F>
Fn5<A,B,C,D,E,F>Fn5. fn5(Fn1<A,Fn4<B,C,D,E,F>> curriedFn1)
static <A,B,C,D,E,F,G>
Fn6<A,B,C,D,E,F,G>Fn6. fn6(Fn1<A,Fn5<B,C,D,E,F,G>> curriedFn1)
static <A,B,C,D,E,F,G,H>
Fn7<A,B,C,D,E,F,G,H>Fn7. fn7(Fn1<A,Fn6<B,C,D,E,F,G,H>> curriedFn1)
static <A,B,C,D,E,F,G,H,I>
Fn8<A,B,C,D,E,F,G,H,I>Fn8. fn8(Fn1<A,Fn7<B,C,D,E,F,G,H,I>> curriedFn1)
default <C> Fn1<A,Tuple2<B,C>>
Fn1. listens(Fn1<? super A,? extends C> fn)
Map the accumulation into a value and pair it with the current output.default Fn1<A,B>
Fn1. local(Fn1<? super A,? extends A> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.default <C> Fn1<A,C>
Fn1. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Fn1<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.Method parameters in com.jnape.palatable.lambda.functions with type arguments of type Fn1 Modifier and Type Method Description static <A,B,C>
Fn2<A,B,C>Fn2. curried(Fn1<A,Fn1<B,C>> curriedFn1)
default <B> Fn0<B>
Fn0. discardL(Applicative<B,Fn1<Unit,?>> appB)
default <C> Fn1<A,C>
Fn1. discardL(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <C> Effect<A>
Effect. discardR(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <B> Fn0<A>
Fn0. discardR(Applicative<B,Fn1<Unit,?>> appB)
default <C> Fn1<A,B>
Fn1. discardR(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <D> Fn2<A,B,C>
Fn2. discardR(Applicative<D,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <E> Fn3<A,B,C,D>
Fn3. discardR(Applicative<E,Fn1<A,?>> appB)
default <F> Fn4<A,B,C,D,E>
Fn4. discardR(Applicative<F,Fn1<A,?>> appB)
default <G> Fn5<A,B,C,D,E,F>
Fn5. discardR(Applicative<G,Fn1<A,?>> appB)
default <H> Fn6<A,B,C,D,E,F,G>
Fn6. discardR(Applicative<H,Fn1<A,?>> appB)
default <I> Fn7<A,B,C,D,E,F,G,H>
Fn7. discardR(Applicative<I,Fn1<A,?>> appB)
default <J> Fn8<A,B,C,D,E,F,G,H,I>
Fn8. discardR(Applicative<J,Fn1<A,?>> appB)
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.static <A,B,C,D>
Fn3<A,B,C,D>Fn3. fn3(Fn2<A,B,Fn1<C,D>> curriedFn2)
static <A,B,C,D,E>
Fn4<A,B,C,D,E>Fn4. fn4(Fn3<A,B,C,Fn1<D,E>> curriedFn3)
static <A,B,C,D,E,F>
Fn5<A,B,C,D,E,F>Fn5. fn5(Fn4<A,B,C,D,Fn1<E,F>> curriedFn4)
static <A,B,C,D,E,F,G>
Fn6<A,B,C,D,E,F,G>Fn6. fn6(Fn5<A,B,C,D,E,Fn1<F,G>> curriedFn5)
static <A,B,C,D,E,F,G,H>
Fn7<A,B,C,D,E,F,G,H>Fn7. fn7(Fn6<A,B,C,D,E,F,Fn1<G,H>> curriedFn6)
static <A,B,C,D,E,F,G,H,I>
Fn8<A,B,C,D,E,F,G,H,I>Fn8. fn8(Fn7<A,B,C,D,E,F,G,Fn1<H,I>> curriedFn7)
default <C> Lazy<Fn1<A,C>>
Fn1. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Fn1<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <C> Lazy<Fn1<A,C>>
Fn1. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Fn1<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <C> Fn1<A,C>
Fn1. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Fn1<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.static <A,B>
Fn1<A,B>Fn1. withSelf(Fn2<? super Fn1<? super A,? extends B>,? super A,? extends B> fn)
Construct anFn1
that has a reference to itself in scope at the time it is executed (presumably for recursive invocations).default <B> Fn0<B>
Fn0. zip(Applicative<Fn1<? super A,? extends B>,Fn1<Unit,?>> appFn)
default <B> Fn0<B>
Fn0. zip(Applicative<Fn1<? super A,? extends B>,Fn1<Unit,?>> appFn)
default <C> Fn1<A,C>
Fn1. zip(Applicative<Fn1<? super B,? extends C>,Fn1<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <C> Fn1<A,C>
Fn1. zip(Applicative<Fn1<? super B,? extends C>,Fn1<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn1
Classes in com.jnape.palatable.lambda.functions.builtin.fn1 that implement Fn1 Modifier and Type Class Description class
CatMaybes<A>
Given an
, return anIterable
<Maybe
<A>>
of only the present values.Iterable
<A>class
Coalesce<L,R>
class
Constantly<A,B>
A function that takes two arguments and always returns the first argument.class
Cycle<A>
Given anIterable
, return an infiniteIterable
that repeatedly cycles its elements, in order.class
Distinct<A>
Return anIterable
of the distinct values from the given inputIterable
.class
Downcast<A extends B,B>
Covariantly cast a value of typeB
to a value of subtypeA
.class
Empty<A>
A predicate that returns true ifas
is empty; false otherwise.class
Flatten<A>
Given a nestedIterable
ofIterable
s, return a lazily flatteningIterable
of the nested elements.class
Force<A>
Deprecated.in favor oftraversing
into anIO
and running itclass
Head<A>
Retrieve the head element of anIterable
, wrapped in anMaybe
.class
Id<A>
The identity function.class
Init<A>
Given an
, produce anIterable
<A>
of all elements but the last one.Iterable
<A>class
Inits<A>
Given an
, produce anIterable
<A>
, representing all of the subsequences of initial elements, ordered by size, starting with the emptyIterable
<Iterable
<A>>Iterable
.class
Last<A>
Retrieve the last element of anIterable
, wrapped in aMaybe
.class
Magnetize<A>
Magnetize
anIterable
using value equality as the magnetizing function.class
Not<A>
Negate a predicate function.class
Occurrences<A>
Given an
, return aIterable
<A>
representing each unique element in theMap
<A, Long>Iterable
paired with its number of occurrences.class
Repeat<A>
Given a value, return an infiniteIterable
that repeatedly iterates that value.class
Reverse<A>
Given anIterable
, return a reversed representation of thatIterable
.class
Size
class
Sort<A extends java.lang.Comparable<A>>
Given anIterable
ofComparable
elements, return aList
of the sorted elements.class
Tail<A>
Returns the tail of anIterable
; the is, anIterable
of all the elements except for the head element.class
Tails<A>
Given an
, produce anIterable
<A>
, representing all of the subsequences of tail elements, ordered by size, starting with the fullIterable
<Iterable
<A>>Iterable
.class
Uncons<A>
class
Upcast<A extends B,B>
Upcast a value of typeB
to a value of typeA
thatB
extends.Methods in com.jnape.palatable.lambda.functions.builtin.fn1 that return Fn1 Modifier and Type Method Description static <A,B>
Fn1<B,A>Constantly. constantly(A a)
Methods in com.jnape.palatable.lambda.functions.builtin.fn1 with parameters of type Fn1 Modifier and Type Method Description java.lang.Boolean
Not. checkedApply(Fn1<? super A,? extends java.lang.Boolean> pred, A a)
static <A> Predicate<A>
Not. not(Fn1<? super A,? extends java.lang.Boolean> pred)
static <A> java.lang.Boolean
Not. not(Fn1<? super A,? extends java.lang.Boolean> pred, A a)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn2
Classes in com.jnape.palatable.lambda.functions.builtin.fn2 that implement Fn1 Modifier and Type Class Description class
$<A,B>
class
All<A>
Eagerly apply a predicate to each element in anIterable
, returningtrue
if every element satisfies the predicate, andfalse
otherwise.class
Alter<A>
class
Any<A>
Eagerly apply a predicate to each element in anIterable
, returningtrue
if any element satisfies the predicate, andfalse
otherwise.class
AutoBracket<A extends java.lang.AutoCloseable,B>
class
Both<A,B,C>
class
CartesianProduct<A,B>
Lazily compute the cartesian product of anIterable<A>
andIterable<B>
, returning anIterable<Tuple2<A, B>>
, the products as tuples of multiplicandA
s and multiplierB
s.class
CmpEq<A extends java.lang.Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the first value is strictly equal to the second value (according toComparable.compareTo(Object)
; otherwise, return false.class
Cons<A>
Prepend an element to anIterable
.class
Difference<A>
class
Drop<A>
Lazily skip the firstn
elements from anIterable
by returning anIterable
that begins iteration after thenth
element.class
DropWhile<A>
Lazily limit theIterable
by skipping the first contiguous group of elements that satisfy the predicate, beginning iteration at the first element for which the predicate evaluates tofalse
.class
Eq<A>
Type-safe equality in function form; usesObject.equals(java.lang.Object)
, not==
.class
Filter<A>
Lazily apply a predicate to each element in anIterable
, returning anIterable
of just the elements for which the predicate evaluated totrue
.class
Find<A>
Iterate the elements in anIterable
, applying a predicate to each one, returning the first element that matches the predicate, wrapped in aMaybe
.class
GroupBy<K,V>
Given anIterable<V>
vs
and a key functionV -> K
f
, foldvs
into aMap<K, List<V>>
by applyingf
to each element ofvs
, retaining values that map to the same key in a list, in the order they were iterated in.class
GT<A extends java.lang.Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is strictly greater than the first value; otherwise, return false.class
GTE<A extends java.lang.Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is greater than or equal to the first value according toComparable.compareTo(Object)
; otherwise, return false.class
InGroupsOf<A>
Lazily group theIterable
by returning anIterable
of smallerIterable
s of sizek
.class
Intersperse<A>
Lazily inject the provided separator value between each value in the suppliedIterable
.class
Into<A,B,C>
Given an
and 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>class
Into1<A,B>
Given an
and aFn1
<A, B>
, pop the head and apply it to the function, returning the result.SingletonHList
<A>class
Into3<A,B,C,D>
class
Into4<A,B,C,D,E>
class
Into5<A,B,C,D,E,F>
class
Into6<A,B,C,D,E,F,G>
class
Into7<A,B,C,D,E,F,G,H>
class
Into8<A,B,C,D,E,F,G,H,I>
class
Iterate<A>
Lazily generate an infiniteIterable
from 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 infiniteIterable
over the elements0, 1, 2, 3, ...
class
LazyRec<A,B>
class
LT<A extends java.lang.Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is strictly less than the first value; otherwise, return false.class
LTE<A extends java.lang.Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is less than or equal to the first value according toComparable.compareTo(Object)
otherwise, return false.class
MagnetizeBy<A>
Given a binary predicate and an
, return anIterable
<A>
of the contiguous groups of elements that match the predicate pairwise.Iterable
<Iterable
<A>>class
Map<A,B>
Lazily apply a function to each element in anIterable
, producing anIterable
of the mapped results.class
Partition<A,B,C>
Given anIterable<A>
as
and a disjoint mapping functiona -> CoProduct2<A, B>
, return aTuple2
over the lazily unwrapped leftA
and rightB
values in the first and second slots, respectively.class
Peek<A,FA extends Functor<A,?>>
class
Peek2<A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
Deprecated.in favor of producing anIO
from the givenBoundedBifunctor
and explicitly running itclass
PrependAll<A>
Lazily prepend each value with of theIterable
with the supplied separator value.class
ReduceLeft<A>
class
ReduceRight<A>
class
Replicate<A>
Produce anIterable
of a valuen
times.class
Sequence<A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
Given aTraversable
ofApplicative
s and a pureApplicative
constructor, traverse the elements from left to right, zipping theApplicative
s together and collecting the results.class
Slide<A>
Given an
, "slide" a window ofIterable
<A>k
elements across theIterable
by one element at a time, returning an
.Iterable
<Iterable
<A>>class
Snoc<A>
Opposite ofCons
: lazily append an element to the end of the givenIterable
.class
SortBy<A,B extends java.lang.Comparable<B>>
Given anIterable
and some mapping function from theIterable
element type to someComparable
type, produce a sortedList
of the original elements based on sorting applied to the result of the mapping function.class
SortWith<A>
Given anIterable
and aComparator
over theIterable
element type, produce a sortedList
of the original elements based on sorting applied by theComparator
.class
Span<A>
Given a predicate, return aTuple2
where the first slot is the front contiguous elements of anIterable
matching the predicate and the second slot is all the remaining elements.class
Take<A>
Lazily limit theIterable
ton
elements by returning anIterable
that stops iteration after thenth
element, or the last element of theIterable
, whichever comes first.class
TakeWhile<A>
Lazily limit theIterable
to 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
.class
ToArray<A>
Write all the elements of anIterable
directly into an array of the specified type.class
ToCollection<A,C extends java.util.Collection<A>>
Given anFn0
of someCollection
C
, create an instance ofC
and add all of the elements in the providedIterable
to the instance.class
ToMap<K,V,M extends java.util.Map<K,V>>
Given anFn0
of someMap
M
, create an instance ofM
and put all of the entries in the providedIterable
into the instance.class
Tupler2<A,B>
Creates aTuple2
from two values.class
Unfoldr<A,B>
class
Until<A>
Given apredicate function
for a value of some typeA
and anIO
that yields a value of typeA
, produce anIO
that repeatedly executes the originalIO
until the predicate returns true when applied to the yielded value.class
Zip<A,B>
Zip together twoIterable
s into a singleIterable
ofTuple2<A, B>
.Methods in com.jnape.palatable.lambda.functions.builtin.fn2 that return Fn1 Modifier and Type Method Description static <A,B>
Fn1<A,B>$. $(Fn1<? super A,? extends B> fn)
static <A> Fn1<java.lang.Iterable<A>,? extends java.lang.Boolean>
All. all(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Fn1<A,IO<A>>
Alter. alter(Effect<? super A> effect)
static <A extends java.lang.AutoCloseable,B>
Fn1<Fn1<? super A,? extends IO<B>>,IO<B>>AutoBracket. autoBracket(IO<A> io)
static <A,B,C>
Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>Both. both(Fn1<? super A,? extends B> f)
static <A,B,C>
Fn1<A,Tuple2<B,C>>Both. both(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g)
static <A,B>
Fn1<java.lang.Iterable<B>,java.lang.Iterable<Tuple2<A,B>>>CartesianProduct. cartesianProduct(java.lang.Iterable<A> as)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Cons. cons(A a)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Difference. difference(java.lang.Iterable<A> xs)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Drop. drop(int n)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
DropWhile. dropWhile(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Filter. filter(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Fn1<java.lang.Iterable<A>,Maybe<A>>
Find. find(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <K,V>
Fn1<java.lang.Iterable<V>,java.util.Map<K,java.util.List<V>>>GroupBy. groupBy(Fn1<? super V,? extends K> keyFn)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<java.lang.Iterable<A>>>
InGroupsOf. inGroupsOf(java.lang.Integer k)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Intersperse. intersperse(A a)
static <A,B,C>
Fn1<java.util.Map.Entry<A,B>,C>Into. into(Fn2<? super A,? super B,? extends C> fn)
static <A,B>
Fn1<SingletonHList<A>,B>Into1. into1(Fn1<? super A,? extends B> fn)
static <A,B,C,D>
Fn1<Product3<A,B,C>,D>Into3. into3(Fn3<? super A,? super B,? super C,? extends D> fn)
static <A,B,C,D,E>
Fn1<Product4<A,B,C,D>,E>Into4. into4(Fn4<? super A,? super B,? super C,? super D,? extends E> fn)
static <A,B,C,D,E,F>
Fn1<Product5<A,B,C,D,E>,F>Into5. into5(Fn5<? super A,? super B,? super C,? super D,? super E,? extends F> fn)
static <A,B,C,D,E,F,G>
Fn1<Product6<A,B,C,D,E,F>,G>Into6. into6(Fn6<? super A,? super B,? super C,? super D,? super E,? super F,? extends G> fn)
static <A,B,C,D,E,F,G,H>
Fn1<Product7<A,B,C,D,E,F,G>,H>Into7. into7(Fn7<? super A,? super B,? super C,? super D,? super E,? super F,? super G,? extends H> fn)
static <A,B,C,D,E,F,G,H,I>
Fn1<Product8<A,B,C,D,E,F,G,H>,I>Into8. into8(Fn8<? super A,? super B,? super C,? super D,? super E,? super F,? super G,? super H,? extends I> fn)
static <A> Fn1<A,java.lang.Iterable<A>>
Iterate. iterate(Fn1<? super A,? extends A> fn)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<java.lang.Iterable<A>>>
MagnetizeBy. magnetizeBy(Fn2<? super A,? super A,? extends java.lang.Boolean> predicate)
static <A,B>
Fn1<java.lang.Iterable<A>,java.lang.Iterable<B>>Map. map(Fn1<? super A,? extends B> fn)
static <A,B,C>
Fn1<java.lang.Iterable<A>,Tuple2<java.lang.Iterable<B>,java.lang.Iterable<C>>>Partition. partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function)
static <A,FA extends Functor<A,?>>
Fn1<FA,FA>Peek. peek(Fn1<? super A,? extends IO<?>> effect)
Deprecated.static <A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
Fn1<FAB,FAB>Peek2. peek2(Fn1<? super A,? extends IO<?>> effectA, Fn1<? super B,? extends IO<?>> effectB)
Deprecated.static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
PrependAll. prependAll(A a)
static <A> Fn1<java.lang.Iterable<A>,Maybe<A>>
ReduceLeft. reduceLeft(Fn2<? super A,? super A,? extends A> fn)
static <A> Fn1<java.lang.Iterable<A>,Maybe<A>>
ReduceRight. reduceRight(Fn2<? super A,? super A,? extends A> fn)
static <A> Fn1<A,java.lang.Iterable<A>>
Replicate. replicate(java.lang.Integer n)
static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>Sequence. sequence(Traversable<? extends Applicative<A,App>,Trav> traversable)
static <A,App extends Applicative<?,App>,AppIterable extends Applicative<java.lang.Iterable<A>,App>>
Fn1<Fn1<java.lang.Iterable<A>,? extends AppIterable>,AppIterable>Sequence. sequence(java.lang.Iterable<? extends Applicative<A,App>> iterableApp)
static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<java.util.Map<A,B>,App>>
Fn1<Fn1<java.util.Map<A,B>,? extends AppMap>,AppMap>Sequence. sequence(java.util.Map<A,? extends Applicative<B,App>> mapApp)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<java.lang.Iterable<A>>>
Slide. slide(java.lang.Integer k)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Snoc. snoc(A a)
static <A,B extends java.lang.Comparable<B>>
Fn1<java.lang.Iterable<A>,java.util.List<A>>SortBy. sortBy(Fn1<? super A,? extends B> fn)
static <A> Fn1<java.lang.Iterable<A>,java.util.List<A>>
SortWith. sortWith(java.util.Comparator<? super A> comparator)
static <A> Fn1<java.lang.Iterable<A>,Tuple2<java.lang.Iterable<A>,java.lang.Iterable<A>>>
Span. span(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Take. take(int n)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
TakeWhile. takeWhile(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Fn1<java.lang.Iterable<? extends A>,A[]>
ToArray. toArray(java.lang.Class<A[]> arrayType)
static <A,C extends java.util.Collection<A>>
Fn1<java.lang.Iterable<A>,C>ToCollection. toCollection(Fn0<C> cFn0)
static <K,V,M extends java.util.Map<K,V>>
Fn1<java.lang.Iterable<? extends java.util.Map.Entry<K,V>>,M>ToMap. toMap(Fn0<M> mFn0)
static <A,B>
Fn1<B,Tuple2<A,B>>Tupler2. tupler(A a)
static <A,B>
Fn1<B,java.lang.Iterable<A>>Unfoldr. unfoldr(Fn1<? super B,Maybe<Tuple2<A,B>>> fn)
static <A> Fn1<IO<A>,IO<A>>
Until. until(Fn1<? super A,? extends java.lang.Boolean> pred)
static <A,B>
Fn1<java.lang.Iterable<B>,java.lang.Iterable<Tuple2<A,B>>>Zip. zip(java.lang.Iterable<A> as)
Methods in com.jnape.palatable.lambda.functions.builtin.fn2 that return types with arguments of type Fn1 Modifier and Type Method Description static <A extends java.lang.AutoCloseable,B>
Fn1<Fn1<? super A,? extends IO<B>>,IO<B>>AutoBracket. autoBracket(IO<A> io)
static <A,B,C>
Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>Both. both(Fn1<? super A,? extends B> f)
static <A,B,C>
Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>Both. both(Fn1<? super A,? extends B> f)
static <A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
Fn2<Fn1<? super B,? extends IO<?>>,FAB,FAB>Peek2. peek2(Fn1<? super A,? extends IO<?>> effectA)
Deprecated.static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>Sequence. sequence(Traversable<? extends Applicative<A,App>,Trav> traversable)
static <A,App extends Applicative<?,App>,AppIterable extends Applicative<java.lang.Iterable<A>,App>>
Fn1<Fn1<java.lang.Iterable<A>,? extends AppIterable>,AppIterable>Sequence. sequence(java.lang.Iterable<? extends Applicative<A,App>> iterableApp)
static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<java.util.Map<A,B>,App>>
Fn1<Fn1<java.util.Map<A,B>,? extends AppMap>,AppMap>Sequence. sequence(java.util.Map<A,? extends Applicative<B,App>> mapApp)
Methods in com.jnape.palatable.lambda.functions.builtin.fn2 with parameters of type Fn1 Modifier and Type Method Description static <A,B>
Fn1<A,B>$. $(Fn1<? super A,? extends B> fn)
static <A,B>
B$. $(Fn1<? super A,? extends B> fn, A a)
static <A> Fn1<java.lang.Iterable<A>,? extends java.lang.Boolean>
All. all(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> java.lang.Boolean
All. all(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A> Predicate<java.lang.Iterable<A>>
Any. any(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> java.lang.Boolean
Any. any(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A extends java.lang.AutoCloseable,B>
IO<B>AutoBracket. autoBracket(IO<A> io, Fn1<? super A,? extends IO<B>> bodyIO)
static <A,B,C>
Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>Both. both(Fn1<? super A,? extends B> f)
static <A,B,C>
Fn1<A,Tuple2<B,C>>Both. both(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g)
static <A,B,C>
Tuple2<B,C>Both. both(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g, A a)
B
$. checkedApply(Fn1<? super A,? extends B> fn, A a)
java.lang.Boolean
All. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
IO<A>
Alter. checkedApply(Fn1<? super A,? extends IO<?>> effect, A a)
java.lang.Boolean
Any. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
IO<B>
AutoBracket. checkedApply(IO<A> io, Fn1<? super A,? extends IO<B>> bodyIO)
Tuple2<B,C>
Both. checkedApply(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g, A a)
java.lang.Iterable<A>
DropWhile. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
java.lang.Iterable<A>
Filter. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
Maybe<A>
Find. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
java.util.Map<K,java.util.List<V>>
GroupBy. checkedApply(Fn1<? super V,? extends K> keyFn, java.lang.Iterable<V> vs)
B
Into1. checkedApply(Fn1<? super A,? extends B> fn, SingletonHList<A> singletonHList)
java.lang.Iterable<A>
Iterate. checkedApply(Fn1<? super A,? extends A> fn, A seed)
java.lang.Iterable<B>
Map. checkedApply(Fn1<? super A,? extends B> fn, java.lang.Iterable<A> as)
Tuple2<java.lang.Iterable<B>,java.lang.Iterable<C>>
Partition. checkedApply(Fn1<? super A,? extends CoProduct2<B,C,?>> function, java.lang.Iterable<A> as)
FA
Peek. checkedApply(Fn1<? super A,? extends IO<?>> effect, FA fa)
Deprecated.FAB
Peek2. checkedApply(Fn1<? super A,? extends IO<?>> effectA, Fn1<? super B,? extends IO<?>> effectB, FAB fab)
Deprecated.AppTrav
Sequence. checkedApply(Traversable<? extends Applicative<A,App>,Trav> traversable, Fn1<TravA,? extends AppTrav> pure)
java.util.List<A>
SortBy. checkedApply(Fn1<? super A,? extends B> fn, java.lang.Iterable<A> as)
Tuple2<java.lang.Iterable<A>,java.lang.Iterable<A>>
Span. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
java.lang.Iterable<A>
TakeWhile. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
java.lang.Iterable<A>
Unfoldr. checkedApply(Fn1<? super B,Maybe<Tuple2<A,B>>> fn, B b)
IO<A>
Until. checkedApply(Fn1<? super A,? extends java.lang.Boolean> pred, IO<A> io)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
DropWhile. dropWhile(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> java.lang.Iterable<A>
DropWhile. dropWhile(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Filter. filter(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> java.lang.Iterable<A>
Filter. filter(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A> Fn1<java.lang.Iterable<A>,Maybe<A>>
Find. find(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Maybe<A>
Find. find(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <K,V>
Fn1<java.lang.Iterable<V>,java.util.Map<K,java.util.List<V>>>GroupBy. groupBy(Fn1<? super V,? extends K> keyFn)
static <K,V>
java.util.Map<K,java.util.List<V>>GroupBy. groupBy(Fn1<? super V,? extends K> keyFn, java.lang.Iterable<V> vs)
static <A,B>
Fn1<SingletonHList<A>,B>Into1. into1(Fn1<? super A,? extends B> fn)
static <A,B>
BInto1. into1(Fn1<? super A,? extends B> fn, SingletonHList<A> singletonHList)
static <A> Fn1<A,java.lang.Iterable<A>>
Iterate. iterate(Fn1<? super A,? extends A> fn)
static <A> java.lang.Iterable<A>
Iterate. iterate(Fn1<? super A,? extends A> fn, A seed)
static <A,B>
Fn1<java.lang.Iterable<A>,java.lang.Iterable<B>>Map. map(Fn1<? super A,? extends B> fn)
static <A,B>
java.lang.Iterable<B>Map. map(Fn1<? super A,? extends B> fn, java.lang.Iterable<A> as)
static <A,B,C>
Fn1<java.lang.Iterable<A>,Tuple2<java.lang.Iterable<B>,java.lang.Iterable<C>>>Partition. partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function)
static <A,B,C>
Tuple2<java.lang.Iterable<B>,java.lang.Iterable<C>>Partition. partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function, java.lang.Iterable<A> as)
static <A,FA extends Functor<A,?>>
Fn1<FA,FA>Peek. peek(Fn1<? super A,? extends IO<?>> effect)
Deprecated.static <A,FA extends Functor<A,?>>
FAPeek. peek(Fn1<? super A,? extends IO<?>> effect, FA fa)
Deprecated.static <A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
Fn2<Fn1<? super B,? extends IO<?>>,FAB,FAB>Peek2. peek2(Fn1<? super A,? extends IO<?>> effectA)
Deprecated.static <A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
Fn1<FAB,FAB>Peek2. peek2(Fn1<? super A,? extends IO<?>> effectA, Fn1<? super B,? extends IO<?>> effectB)
Deprecated.static <A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
FABPeek2. peek2(Fn1<? super A,? extends IO<?>> effectA, Fn1<? super B,? extends IO<?>> effectB, FAB fab)
Deprecated.static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
AppTravSequence. sequence(Traversable<? extends Applicative<A,App>,Trav> traversable, Fn1<TravA,? extends AppTrav> pure)
static <A,App extends Applicative<?,App>,AppIterable extends Applicative<java.lang.Iterable<A>,App>>
AppIterableSequence. sequence(java.lang.Iterable<? extends Applicative<A,App>> iterableApp, Fn1<java.lang.Iterable<A>,? extends AppIterable> pure)
static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<java.util.Map<A,B>,App>>
AppMapSequence. sequence(java.util.Map<A,? extends Applicative<B,App>> mapApp, Fn1<java.util.Map<A,B>,? extends AppMap> pure)
static <A,B extends java.lang.Comparable<B>>
Fn1<java.lang.Iterable<A>,java.util.List<A>>SortBy. sortBy(Fn1<? super A,? extends B> fn)
static <A,B extends java.lang.Comparable<B>>
java.util.List<A>SortBy. sortBy(Fn1<? super A,? extends B> fn, java.lang.Iterable<A> as)
static <A> Fn1<java.lang.Iterable<A>,Tuple2<java.lang.Iterable<A>,java.lang.Iterable<A>>>
Span. span(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> Tuple2<java.lang.Iterable<A>,java.lang.Iterable<A>>
Span. span(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
TakeWhile. takeWhile(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A> java.lang.Iterable<A>
TakeWhile. takeWhile(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
static <A,B>
Fn1<B,java.lang.Iterable<A>>Unfoldr. unfoldr(Fn1<? super B,Maybe<Tuple2<A,B>>> fn)
static <A,B>
java.lang.Iterable<A>Unfoldr. unfoldr(Fn1<? super B,Maybe<Tuple2<A,B>>> fn, B b)
static <A> Fn1<IO<A>,IO<A>>
Until. until(Fn1<? super A,? extends java.lang.Boolean> pred)
static <A> IO<A>
Until. until(Fn1<? super A,? extends java.lang.Boolean> pred, IO<A> io)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn3
Classes in com.jnape.palatable.lambda.functions.builtin.fn3 that implement Fn1 Modifier and Type Class Description class
Between<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.class
Bracket<A,B>
Given anIO
that 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 newIO
of typeB
, produce an
that, when run, will provision theIO
<B>A
,flatMap
it toB
, and clean up the original value if it was produced in the first place.class
Clamp<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 valueclass
CmpEqBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
and two values of typeA
, returntrue
if the first value is strictly equal to the second value (according toComparable.compareTo(Object)
in terms of their mappedB
results; otherwise, return false.class
CmpEqWith<A>
Given aComparator
from some typeA
and two values of typeA
, returntrue
if the first value is strictly equal to the second value (according toComparator.compare(Object, Object)
otherwise, return false.class
Compare<A>
Given aComparator
from some typeA
and two values of typeA
, return aComparisonRelation
of the first value with reference to the second value (according toComparator.compare(Object, Object)
.class
FoldLeft<A,B>
Given anIterable
ofA
s, a starting valueB
, and a
, iteratively accumulate over theFn2
<B, A, B>Iterable
, ultimately returning a finalB
value.class
FoldRight<A,B>
class
GTBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
and two values of typeA
, returntrue
if the second value is strictly greater than the first value in terms of their mappedB
results; otherwise, return false.class
GTEBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
and two values of typeA
, returntrue
if the second value is greater than or equal to the first value in terms of their mappedB
results according toComparable.compareTo(Object)
; otherwise, return false.class
GTEWith<A>
Given aComparator
from some typeA
and two values of typeA
, returntrue
if the second value is greater than or equal to the first value in terms of their mappedB
results according toComparator.compare(Object, Object)
; otherwise, return false.class
GTWith<A>
Given aComparator
from some typeA
and two values of typeA
, returntrue
if the second value is strictly greater than the first value in terms of their mappedB
results; otherwise, return false.class
LiftA2<A,B,C,App extends Applicative<?,App>,AppC extends Applicative<C,App>>
Lift into and apply anFn2
to twoApplicative
values, returning the result inside the sameApplicative
context.class
LTBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
and two values of typeA
, returntrue
if the second value is strictly less than the first value in terms of their mappedB
results; otherwise, return false.class
LTEBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
and two values of typeA
, returntrue
if the second value is less than or equal to the first value in terms of their mappedB
results according toComparable.compareTo(Object)
; otherwise, return false.class
LTEWith<A>
Given aComparator
from some typeA
and two values of typeA
, returntrue
if the second value is less than or equal to the first value in terms of their mappedB
results according toComparator.compare(Object, Object)
; otherwise, return false.class
LTWith<A>
Given a comparator for some typeA
and two values of typeA
, returntrue
if the second value is strictly less than than the first value in terms of their mappedB
results; otherwise, return false.class
ScanLeft<A,B>
Given anIterable
ofA
s, a starting valueB
, and a
, iteratively accumulate over theFn2
<B, A, B>Iterable
, collecting each function application result, finally returning anIterable
of all the results.class
Times<A>
Given some number of timesn
to 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 ofn
times, returning the result.class
ZipWith<A,B,C>
Zip together twoIterable
s by applying a zipping function to the successive elements of eachIterable
until one of them runs out of elements.Methods in com.jnape.palatable.lambda.functions.builtin.fn3 that return Fn1 Modifier and Type Method Description static <A,B>
Fn1<Fn1<? super A,? extends IO<B>>,IO<B>>Bracket. bracket(IO<A> io, Fn1<? super A,? extends IO<?>> cleanupIO)
static <A extends java.lang.Comparable<A>>
Fn1<A,A>Clamp. clamp(A lower, A upper)
static <A> Fn1<A,ComparisonRelation>
Compare. compare(java.util.Comparator<A> comparator, A a)
static <A,B>
Fn1<java.lang.Iterable<A>,B>FoldLeft. foldLeft(Fn2<? super B,? super A,? extends B> fn, B acc)
static <A,B>
Fn1<java.lang.Iterable<A>,Lazy<B>>FoldRight. foldRight(Fn2<? super A,? super Lazy<B>,? extends Lazy<B>> fn, Lazy<B> acc)
static <A,B,C,App extends Applicative<?,App>,AppC extends Applicative<C,App>>
Fn1<Applicative<B,App>,AppC>LiftA2. liftA2(Fn2<? super A,? super B,? extends C> fn, Applicative<A,App> appA)
static <A,B>
Fn1<java.lang.Iterable<A>,java.lang.Iterable<B>>ScanLeft. scanLeft(Fn2<? super B,? super A,? extends B> fn, B b)
static <A> Fn1<A,A>
Times. times(java.lang.Integer n, Fn1<? super A,? extends A> fn)
static <A,B,C>
Fn1<java.lang.Iterable<B>,java.lang.Iterable<C>>ZipWith. zipWith(Fn2<? super A,? super B,? extends C> zipper, java.lang.Iterable<A> as)
Methods in com.jnape.palatable.lambda.functions.builtin.fn3 that return types with arguments of type Fn1 Modifier and Type Method Description static <A,B>
Fn2<Fn1<? super A,? extends IO<?>>,Fn1<? super A,? extends IO<B>>,IO<B>>Bracket. bracket(IO<A> io)
static <A,B>
Fn2<Fn1<? super A,? extends IO<?>>,Fn1<? super A,? extends IO<B>>,IO<B>>Bracket. bracket(IO<A> io)
static <A,B>
Fn1<Fn1<? super A,? extends IO<B>>,IO<B>>Bracket. bracket(IO<A> io, Fn1<? super A,? extends IO<?>> cleanupIO)
static <A> Fn2<Fn1<? super A,? extends A>,A,A>
Times. times(java.lang.Integer n)
Methods in com.jnape.palatable.lambda.functions.builtin.fn3 with parameters of type Fn1 Modifier and Type Method Description BiPredicate<A,A>
CmpEqBy. apply(Fn1<? super A,? extends B> compareFn)
Predicate<A>
CmpEqBy. apply(Fn1<? super A,? extends B> compareFn, A x)
BiPredicate<A,A>
GTBy. apply(Fn1<? super A,? extends B> compareFn)
Predicate<A>
GTBy. apply(Fn1<? super A,? extends B> compareFn, A x)
BiPredicate<A,A>
GTEBy. apply(Fn1<? super A,? extends B> compareFn)
Predicate<A>
GTEBy. apply(Fn1<? super A,? extends B> compareFn, A y)
BiPredicate<A,A>
LTBy. apply(Fn1<? super A,? extends B> compareFn)
Predicate<A>
LTBy. apply(Fn1<? super A,? extends B> compareFn, A y)
BiPredicate<A,A>
LTEBy. apply(Fn1<? super A,? extends B> compareFn)
Predicate<A>
LTEBy. apply(Fn1<? super A,? extends B> compareFn, A y)
static <A,B>
Fn1<Fn1<? super A,? extends IO<B>>,IO<B>>Bracket. bracket(IO<A> io, Fn1<? super A,? extends IO<?>> cleanupIO)
static <A,B>
IO<B>Bracket. bracket(IO<A> io, Fn1<? super A,? extends IO<?>> cleanupIO, Fn1<? super A,? extends IO<B>> bodyIO)
IO<B>
Bracket. checkedApply(IO<A> io, Fn1<? super A,? extends IO<?>> cleanupIO, Fn1<? super A,? extends IO<B>> bodyIO)
java.lang.Boolean
CmpEqBy. checkedApply(Fn1<? super A,? extends B> compareFn, A x, A y)
java.lang.Boolean
GTBy. checkedApply(Fn1<? super A,? extends B> compareFn, A y, A x)
java.lang.Boolean
GTEBy. checkedApply(Fn1<? super A,? extends B> compareFn, A y, A x)
java.lang.Boolean
LTBy. checkedApply(Fn1<? super A,? extends B> compareFn, A y, A x)
java.lang.Boolean
LTEBy. checkedApply(Fn1<? super A,? extends B> compareFn, A y, A x)
A
Times. checkedApply(java.lang.Integer n, Fn1<? super A,? extends A> fn, A a)
static <A,B extends java.lang.Comparable<B>>
BiPredicate<A,A>CmpEqBy. cmpEqBy(Fn1<? super A,? extends B> compareFn)
static <A,B extends java.lang.Comparable<B>>
Predicate<A>CmpEqBy. cmpEqBy(Fn1<? super A,? extends B> compareFn, A x)
static <A,B extends java.lang.Comparable<B>>
java.lang.BooleanCmpEqBy. cmpEqBy(Fn1<? super A,? extends B> compareFn, A x, A y)
static <A,B extends java.lang.Comparable<B>>
BiPredicate<A,A>GTBy. gtBy(Fn1<? super A,? extends B> fn)
static <A,B extends java.lang.Comparable<B>>
Predicate<A>GTBy. gtBy(Fn1<? super A,? extends B> fn, A y)
static <A,B extends java.lang.Comparable<B>>
java.lang.BooleanGTBy. gtBy(Fn1<? super A,? extends B> fn, A y, A x)
static <A,B extends java.lang.Comparable<B>>
BiPredicate<A,A>GTEBy. gteBy(Fn1<? super A,? extends B> fn)
static <A,B extends java.lang.Comparable<B>>
Predicate<A>GTEBy. gteBy(Fn1<? super A,? extends B> fn, A y)
static <A,B extends java.lang.Comparable<B>>
java.lang.BooleanGTEBy. gteBy(Fn1<? super A,? extends B> fn, A y, A x)
static <A,B extends java.lang.Comparable<B>>
BiPredicate<A,A>LTBy. ltBy(Fn1<? super A,? extends B> fn)
static <A,B extends java.lang.Comparable<B>>
Predicate<A>LTBy. ltBy(Fn1<? super A,? extends B> fn, A y)
static <A,B extends java.lang.Comparable<B>>
java.lang.BooleanLTBy. ltBy(Fn1<? super A,? extends B> fn, A y, A x)
static <A,B extends java.lang.Comparable<B>>
BiPredicate<A,A>LTEBy. lteBy(Fn1<? super A,? extends B> fn)
static <A,B extends java.lang.Comparable<B>>
Predicate<A>LTEBy. lteBy(Fn1<? super A,? extends B> fn, A y)
static <A,B extends java.lang.Comparable<B>>
java.lang.BooleanLTEBy. lteBy(Fn1<? super A,? extends B> fn, A y, A x)
static <A> Fn1<A,A>
Times. times(java.lang.Integer n, Fn1<? super A,? extends A> fn)
static <A> A
Times. times(java.lang.Integer n, Fn1<? super A,? extends A> fn, A a)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn4
Classes in com.jnape.palatable.lambda.functions.builtin.fn4 that implement Fn1 Modifier and Type Class Description class
IfThenElse<A,B>
class
LiftA3<A,B,C,D,App extends Applicative<?,App>,AppD extends Applicative<D,App>>
Lift into and apply anFn3
to threeApplicative
values, returning the result inside the sameApplicative
context.class
RateLimit<A>
Methods in com.jnape.palatable.lambda.functions.builtin.fn4 that return Fn1 Modifier and Type Method Description static <A,B>
Fn1<A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase, Fn1<? super A,? extends B> elseCase)
static <A,B,C,D,App extends Applicative<?,App>,AppD extends Applicative<D,App>>
Fn1<Applicative<C,App>,AppD>LiftA3. liftA3(Fn3<A,B,C,D> fn, Applicative<A,App> appA, Applicative<B,App> appB)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
RateLimit. rateLimit(Fn0<java.time.Instant> instantFn0, java.lang.Long limit, java.time.Duration duration)
Methods in com.jnape.palatable.lambda.functions.builtin.fn4 that return types with arguments of type Fn1 Modifier and Type Method Description static <A,B>
Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends B>,A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A,B>
Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends B>,A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A,B>
Fn2<Fn1<? super A,? extends B>,A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase)
Methods in com.jnape.palatable.lambda.functions.builtin.fn4 with parameters of type Fn1 Modifier and Type Method Description B
IfThenElse. checkedApply(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase, Fn1<? super A,? extends B> elseCase, A a)
static <A,B>
Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends B>,A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate)
static <A,B>
Fn2<Fn1<? super A,? extends B>,A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase)
static <A,B>
Fn1<A,B>IfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase, Fn1<? super A,? extends B> elseCase)
static <A,B>
BIfThenElse. ifThenElse(Fn1<? super A,? extends java.lang.Boolean> predicate, Fn1<? super A,? extends B> thenCase, Fn1<? super A,? extends B> elseCase, A a)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn5
Classes in com.jnape.palatable.lambda.functions.builtin.fn5 that implement Fn1 Modifier and Type Class Description class
LiftA4<A,B,C,D,E,App extends Applicative<?,App>,AppE extends Applicative<E,App>>
Lift into and apply anFn4
to fourApplicative
values, returning the result inside the sameApplicative
context.Methods in com.jnape.palatable.lambda.functions.builtin.fn5 that return Fn1 Modifier and Type Method Description static <A,B,C,D,E,App extends Applicative<?,App>,AppE extends Applicative<E,App>>
Fn1<Applicative<D,App>,AppE>LiftA4. liftA4(Fn4<A,B,C,D,E> fn, Applicative<A,App> appA, Applicative<B,App> appB, Applicative<C,App> appC)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn6
Classes in com.jnape.palatable.lambda.functions.builtin.fn6 that implement Fn1 Modifier and Type Class Description class
LiftA5<A,B,C,D,E,F,App extends Applicative<?,App>,AppF extends Applicative<F,App>>
Lift into and apply anFn5
to fiveApplicative
values, returning the result inside the sameApplicative
context.Methods in com.jnape.palatable.lambda.functions.builtin.fn6 that return Fn1 Modifier and Type Method Description static <A,B,C,D,E,F,App extends Applicative<?,App>,AppF extends Applicative<F,App>>
Fn1<Applicative<E,App>,AppF>LiftA5. liftA5(Fn5<A,B,C,D,E,F> fn, Applicative<A,App> appA, Applicative<B,App> appB, Applicative<C,App> appC, Applicative<D,App> appD)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn7
Classes in com.jnape.palatable.lambda.functions.builtin.fn7 that implement Fn1 Modifier and Type Class Description class
LiftA6<A,B,C,D,E,F,G,App extends Applicative<?,App>,AppG extends Applicative<G,App>>
Lift into and apply anFn6
to sixApplicative
values, returning the result inside the sameApplicative
context.Methods in com.jnape.palatable.lambda.functions.builtin.fn7 that return Fn1 Modifier and Type Method Description static <A,B,C,D,E,F,G,App extends Applicative<?,App>,AppG extends Applicative<G,App>>
Fn1<Applicative<F,App>,AppG>LiftA6. liftA6(Fn6<A,B,C,D,E,F,G> fn, Applicative<A,App> appA, Applicative<B,App> appB, Applicative<C,App> appC, Applicative<D,App> appD, Applicative<E,App> appE)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn8
Classes in com.jnape.palatable.lambda.functions.builtin.fn8 that implement Fn1 Modifier and Type Class Description class
LiftA7<A,B,C,D,E,F,G,H,App extends Applicative<?,App>,AppH extends Applicative<H,App>>
Lift into and apply anFn7
to sevenApplicative
values, returning the result inside the sameApplicative
context.Methods in com.jnape.palatable.lambda.functions.builtin.fn8 that return Fn1 Modifier and Type Method Description static <A,B,C,D,E,F,G,H,App extends Applicative<?,App>,AppH extends Applicative<H,App>>
Fn1<Applicative<G,App>,AppH>LiftA7. liftA7(Fn7<A,B,C,D,E,F,G,H> fn, Applicative<A,App> appA, Applicative<B,App> appB, Applicative<C,App> appC, Applicative<D,App> appD, Applicative<E,App> appE, Applicative<F,App> appF)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.ordering
Methods in com.jnape.palatable.lambda.functions.ordering with parameters of type Fn1 Modifier and Type Method Description <R> R
ComparisonRelation.Equal. match(Fn1<? super ComparisonRelation.LessThan,? extends R> aFn, Fn1<? super ComparisonRelation.Equal,? extends R> bFn, Fn1<? super ComparisonRelation.GreaterThan,? extends R> cFn)
<R> R
ComparisonRelation.GreaterThan. match(Fn1<? super ComparisonRelation.LessThan,? extends R> aFn, Fn1<? super ComparisonRelation.Equal,? extends R> bFn, Fn1<? super ComparisonRelation.GreaterThan,? extends R> cFn)
<R> R
ComparisonRelation.LessThan. match(Fn1<? super ComparisonRelation.LessThan,? extends R> aFn, Fn1<? super ComparisonRelation.Equal,? extends R> bFn, Fn1<? super ComparisonRelation.GreaterThan,? extends R> cFn)
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.recursion
Classes in com.jnape.palatable.lambda.functions.recursion that implement Fn1 Modifier and Type Class Description class
Trampoline<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
).Methods in com.jnape.palatable.lambda.functions.recursion that return Fn1 Modifier and Type Method Description static <A,B>
Fn1<A,B>Trampoline. trampoline(Fn1<? super A,? extends RecursiveResult<A,B>> fn)
Methods in com.jnape.palatable.lambda.functions.recursion with parameters of type Fn1 Modifier and Type Method Description <C,D>
RecursiveResult<C,D>RecursiveResult. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<C> RecursiveResult<C,B>
RecursiveResult. biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.<C> RecursiveResult<A,C>
RecursiveResult. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.B
Trampoline. checkedApply(Fn1<? super A,? extends RecursiveResult<A,B>> fn, A a)
<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.<C> RecursiveResult<A,C>
RecursiveResult. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.<R> R
RecursiveResult.Recurse. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
<R> R
RecursiveResult.Terminate. match(Fn1<? super A,? extends R> aFn, Fn1<? super B,? extends R> bFn)
static <A,B>
Fn1<A,B>Trampoline. trampoline(Fn1<? super A,? extends RecursiveResult<A,B>> fn)
static <A,B>
BTrampoline. trampoline(Fn1<? super A,? extends RecursiveResult<A,B>> fn, A a)
<C> RecursiveResult<A,C>
RecursiveResult. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,RecursiveResult<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<C,App extends Applicative<?,App>,TravB extends Traversable<C,RecursiveResult<A,?>>,AppTrav extends Applicative<TravB,App>>
AppTravRecursiveResult. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.Method parameters in com.jnape.palatable.lambda.functions.recursion with type arguments of type Fn1 Modifier and Type Method Description <C> RecursiveResult<A,C>
RecursiveResult. zip(Applicative<Fn1<? super B,? extends C>,RecursiveResult<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.functions.specialized
Subinterfaces of Fn1 in com.jnape.palatable.lambda.functions.specialized Modifier and Type Interface Description interface
BiMonoidFactory<A,B,C>
interface
BiPredicate<A,B>
interface
BiSemigroupFactory<A,B,C>
interface
Kleisli<A,B,M extends Monad<?,M>,MB extends Monad<B,M>>
interface
MonoidFactory<A,B>
interface
Predicate<A>
A specializedFn1
that returns aBoolean
.interface
SemigroupFactory<A,B>
Methods in com.jnape.palatable.lambda.functions.specialized with parameters of type Fn1 Modifier and Type Method Description default <Z> Fn2<Z,B,java.lang.Boolean>
BiPredicate. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Kleisli<Z,B,M,MB>
Kleisli. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Predicate<Z>
Predicate. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> BiPredicate<Z,B>
BiPredicate. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <Z> Kleisli<Z,B,M,MB>
Kleisli. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <Z> Predicate<Z>
Predicate. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.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 aKleisli
arrow.static <A> Predicate<A>
Predicate. predicate(Fn1<? super A,? extends java.lang.Boolean> predicate)
Static factory method to create a predicate from anFn1
.Method parameters in com.jnape.palatable.lambda.functions.specialized with type arguments of type Fn1 Modifier and Type Method Description default <D> BiPredicate<A,B>
BiPredicate. discardR(Applicative<D,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <C> Kleisli<A,B,M,MB>
Kleisli. discardR(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <C> Predicate<A>
Predicate. discardR(Applicative<C,Fn1<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
. -
Uses of Fn1 in com.jnape.palatable.lambda.functor
Methods in com.jnape.palatable.lambda.functor with parameters of type Fn1 Modifier and Type Method Description <C,D>
Bifunctor<C,D,BF>Bifunctor. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<C extends ContraA,D extends ContraB>
BoundedBifunctor<C,D,ContraA,ContraB,BF>BoundedBifunctor. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually covariantly map both the left and right parameters into values that are covariant toContraA
andContraB
, respectively.default <C> Bifunctor<C,B,BF>
Bifunctor. biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.default <C extends ContraA>
BoundedBifunctor<C,B,ContraA,ContraB,BF>BoundedBifunctor. biMapL(Fn1<? super A,? extends C> fn)
Covariantly map the left parameter into a value that is covariant toContraA
.default <C> Bifunctor<A,C,BF>
Bifunctor. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.default <C extends ContraB>
BoundedBifunctor<A,C,ContraA,ContraB,BF>BoundedBifunctor. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map the right parameter into a value that is covariant toContraB
.default <Z> Cartesian<Z,B,P>
Cartesian. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Cocartesian<Z,B,P>
Cocartesian. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.<B> Contravariant<B,C>
Contravariant. contraMap(Fn1<? super B,? extends A> fn)
Contravariantly mapA <- B
.default <Z> Profunctor<Z,B,PF>
Profunctor. contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly mapA <- B
.<Z,C>
Cartesian<Z,C,P>Cartesian. diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,C>
Cocartesian<Z,C,P>Cocartesian. diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,C>
Profunctor<Z,C,PF>Profunctor. diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <Z> Cartesian<Z,B,P>
Cartesian. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the left parameter.default <Z> Cocartesian<Z,B,P>
Cocartesian. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the left parameter.default <Z> Profunctor<Z,B,PF>
Profunctor. diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the left parameter.default <C> Cartesian<A,C,P>
Cartesian. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.default <C> Cocartesian<A,C,P>
Cocartesian. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.default <C> Profunctor<A,C,PF>
Profunctor. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.default <B> Applicative<B,App>
Applicative. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> Functor<B,F>
Functor. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.Method parameters in com.jnape.palatable.lambda.functor with type arguments of type Fn1 Modifier and Type Method Description default <B> Lazy<? extends Applicative<B,App>>
Applicative. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,App>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Applicative<B,App>
Applicative. zip(Applicative<Fn1<? super A,? extends B>,App> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.functor.builtin
Fields in com.jnape.palatable.lambda.functor.builtin declared as Fn1 Modifier and Type Field Description private Fn1<? super B,? extends T>
Exchange. bt
private Fn1<? super B,? extends T>
Market. bt
private Fn1<java.lang.Object,Lazy<java.lang.Object>>
Lazy.Compose. flatMap
private Fn1<? super S,? extends A>
Exchange. sa
private Fn1<? super S,? extends Either<T,A>>
Market. sta
private Fn1<? super Monoid<W>,? extends Tuple2<A,W>>
Writer. writerFn
Methods in com.jnape.palatable.lambda.functor.builtin that return Fn1 Modifier and Type Method Description Fn1<? super B,? extends T>
Exchange. bt()
Extract the mappingB -> T
.Fn1<? super B,? extends T>
Market. bt()
Extract the mappingB -> T
.Fn1<? super S,? extends A>
Exchange. sa()
Extract the mappingS -> A
.Fn1<? super S,? extends Either<T,A>>
Market. sta()
Extract the mappingS ->
.Either
<T, A>Methods in com.jnape.palatable.lambda.functor.builtin with parameters of type Fn1 Modifier and Type Method Description <C,D>
Const<C,D>Const. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<Z> Const<Z,B>
Const. biMapL(Fn1<? super A,? extends Z> fn)
Covariantly map over the left parameter.<C> Const<A,C>
Const. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.State<S,A>
State. censor(Fn1<? super S,? extends S> fn)
Update the accumulated state.Writer<W,A>
Writer. censor(Fn1<? super W,? extends W> fn)
Update the accumulated state.<Z> Exchange<A,B,Z,T>
Exchange. contraMap(Fn1<? super Z,? extends S> fn)
Contravariantly mapA <- B
.<R> Market<A,B,R,T>
Market. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.<Z> Tagged<Z,B>
Tagged. contraMap(Fn1<? super Z,? extends S> fn)
Contravariantly mapA <- B
.<Z,C>
Exchange<A,B,Z,C>Exchange. diMap(Fn1<? super Z,? extends S> lFn, Fn1<? super T,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<R,U>
Market<A,B,R,U>Market. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,C>
Tagged<Z,C>Tagged. diMap(Fn1<? super Z,? extends S> lFn, Fn1<? super B,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z> Exchange<A,B,Z,T>
Exchange. diMapL(Fn1<? super Z,? extends S> fn)
Contravariantly map over the left parameter.<R> Market<A,B,R,T>
Market. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.<Z> Tagged<Z,B>
Tagged. diMapL(Fn1<? super Z,? extends S> fn)
Contravariantly map over the left parameter.<C> Exchange<A,B,S,C>
Exchange. diMapR(Fn1<? super T,? extends C> fn)
Covariantly map over the right parameter.<U> Market<A,B,S,U>
Market. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.<C> Tagged<S,C>
Tagged. diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.<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.<B> Compose<F,G,B>
Compose. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<C> Const<A,C>
Const. fmap(Fn1<? super B,? extends C> fn)
Map over the right parameter.<B> Identity<B>
Identity. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> Lazy<B>
Lazy. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<U> Market<A,B,S,U>
Market. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> State<S,B>
State. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<C> Tagged<S,C>
Tagged. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> Writer<W,B>
Writer. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.static <S,A>
State<S,A>State. gets(Fn1<? super S,? extends A> fn)
Create aState
that maps its initial state into its result, but leaves the initial state unchanged.<B> State<S,Tuple2<A,B>>
State. listens(Fn1<? super S,? extends B> fn)
Map the accumulation into a value and pair it with the current output.<B> Writer<W,Tuple2<A,B>>
Writer. listens(Fn1<? super W,? extends B> fn)
Map the accumulation into a value and pair it with the current output.State<S,A>
State. local(Fn1<? super S,? extends S> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.<B> State<S,B>
State. mapState(Fn1<? super Tuple2<A,S>,? extends Tuple2<B,S>> fn)
Map both the result and the final state to a new result and final state.static <S> State<S,Unit>
State. modify(Fn1<? super S,? extends S> fn)
static <S,A>
State<S,A>State. state(Fn1<? super S,? extends Tuple2<A,S>> stateFn)
Create aState
fromstateFn
, a function that maps an initial state into a result and a final state.<C> Const<A,C>
Const. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Const<A,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> Identity<B>
Identity. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,Identity<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> Lazy<B>
Lazy. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,Lazy<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<U> Market<A,B,S,U>
Market. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Market<A,B,S,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> State<S,B>
State. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,State<S,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<C> Tagged<S,C>
Tagged. trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,Tagged<S,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> Writer<W,B>
Writer. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,Writer<W,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<C,App extends Applicative<?,App>,TravB extends Traversable<C,Const<A,?>>,AppTrav extends Applicative<TravB,App>>
AppTravConst. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<B,App extends Applicative<?,App>,TravB extends Traversable<B,Identity<?>>,AppTrav extends Applicative<TravB,App>>
AppTravIdentity. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<B,App extends Applicative<?,App>,TravB extends Traversable<B,Lazy<?>>,AppTrav extends Applicative<TravB,App>>
AppTravLazy. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<C,App extends Applicative<?,App>,TravC extends Traversable<C,Tagged<S,?>>,AppTrav extends Applicative<TravC,App>>
AppTravTagged. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravC,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.State<S,A>
State. withState(Fn1<? super S,? extends S> fn)
Map the final state to a new final state using the provided function.Method parameters in com.jnape.palatable.lambda.functor.builtin with type arguments of type Fn1 Modifier and Type Method Description <B> Lazy<Compose<F,G,B>>
Compose. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,Compose<F,G,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> Lazy<Const<A,C>>
Const. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Const<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<Identity<B>>
Identity. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,Identity<?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<State<S,B>>
State. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,State<S,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<Writer<W,B>>
Writer. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,Writer<W,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Compose<F,G,B>
Compose. zip(Applicative<Fn1<? super A,? extends B>,Compose<F,G,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> Const<A,C>
Const. zip(Applicative<Fn1<? super B,? extends C>,Const<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Identity<B>
Identity. zip(Applicative<Fn1<? super A,? extends B>,Identity<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<B>
Lazy. zip(Applicative<Fn1<? super A,? extends B>,Lazy<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<U> Market<A,B,S,U>
Market. zip(Applicative<Fn1<? super T,? extends U>,Market<A,B,S,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> State<S,B>
State. zip(Applicative<Fn1<? super A,? extends B>,State<S,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> Tagged<S,C>
Tagged. zip(Applicative<Fn1<? super B,? extends C>,Tagged<S,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Writer<W,B>
Writer. zip(Applicative<Fn1<? super A,? extends B>,Writer<W,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Constructors in com.jnape.palatable.lambda.functor.builtin with parameters of type Fn1 Constructor Description Compose(Lazy<java.lang.Object> source, Fn1<java.lang.Object,Lazy<java.lang.Object>> flatMap)
Exchange(Fn1<? super S,? extends A> sa, Fn1<? super B,? extends T> bt)
Market(Fn1<? super B,? extends T> bt, Fn1<? super S,? extends Either<T,A>> sta)
Writer(Fn1<? super Monoid<W>,? extends Tuple2<A,W>> writerFn)
-
Uses of Fn1 in com.jnape.palatable.lambda.internal.iteration
Fields in com.jnape.palatable.lambda.internal.iteration declared as Fn1 Modifier and Type Field Description private Fn1<? super A,? extends java.lang.Iterable<RecursiveResult<A,B>>>
TrampoliningIterator. fn
private Fn1<? super A,? extends B>
MappingIterator. function
private Fn1<? super B,Maybe<Tuple2<A,B>>>
UnfoldingIterator. function
private Fn1<? super A,? extends java.lang.Boolean>
FilteringIterator. predicate
private Fn1<? super A,? extends java.lang.Boolean>
PredicatedTakingIterator. predicate
Fields in com.jnape.palatable.lambda.internal.iteration with type parameters of type Fn1 Modifier and Type Field Description private java.util.List<Fn1<?,?>>
MappingIterable. mappers
private java.util.List<Fn1<? super A,? extends java.lang.Boolean>>
FilteringIterable. predicates
private ImmutableQueue<Fn1<? super A,? extends java.lang.Boolean>>
PredicatedDroppingIterable. predicates
private java.util.Iterator<Fn1<? super A,? extends java.lang.Boolean>>
PredicatedDroppingIterator. predicates
private java.util.List<Fn1<? super A,? extends java.lang.Boolean>>
PredicatedTakingIterable. predicates
Constructors in com.jnape.palatable.lambda.internal.iteration with parameters of type Fn1 Constructor Description FilteringIterable(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
FilteringIterator(Fn1<? super A,? extends java.lang.Boolean> predicate, java.util.Iterator<A> iterator)
MappingIterable(Fn1<? super A,? extends B> fn, java.lang.Iterable<A> as)
MappingIterator(Fn1<? super A,? extends B> function, java.util.Iterator<A> iterator)
PredicatedDroppingIterable(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
PredicatedTakingIterable(Fn1<? super A,? extends java.lang.Boolean> predicate, java.lang.Iterable<A> as)
PredicatedTakingIterator(Fn1<? super A,? extends java.lang.Boolean> predicate, java.util.Iterator<A> asIterator)
TrampoliningIterator(Fn1<? super A,? extends java.lang.Iterable<RecursiveResult<A,B>>> fn, A a)
UnfoldingIterator(Fn1<? super B,Maybe<Tuple2<A,B>>> function, B seed)
Constructor parameters in com.jnape.palatable.lambda.internal.iteration with type arguments of type Fn1 Constructor Description PredicatedDroppingIterator(ImmutableQueue<Fn1<? super A,? extends java.lang.Boolean>> predicates, java.util.Iterator<A> asIterator)
-
Uses of Fn1 in com.jnape.palatable.lambda.io
Fields in com.jnape.palatable.lambda.io with type parameters of type Fn1 Modifier and Type Field Description private Choice2<IO<?>,Fn1<java.lang.Object,IO<?>>>
IO.Compose. composition
Methods in com.jnape.palatable.lambda.io with parameters of type Fn1 Modifier and Type Method Description IO<A>
IO. catchError(Fn1<? super java.lang.Throwable,? extends Monad<A,IO<?>>> recoveryFn)
IO<A>
IO. exceptionally(Fn1<? super java.lang.Throwable,? extends A> recoveryFn)
Deprecated.in favor of canonicalIO.catchError(Fn1)
<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.<B> IO<B>
IO. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> IO<B>
IO. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,IO<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.Method parameters in com.jnape.palatable.lambda.io with type arguments of type Fn1 Modifier and Type Method Description <B> Lazy<IO<B>>
IO. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,IO<?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> IO<B>
IO. zip(Applicative<Fn1<? super A,? extends B>,IO<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Constructor parameters in com.jnape.palatable.lambda.io with type arguments of type Fn1 Constructor Description Compose(IO<?> source, Choice2<IO<?>,Fn1<java.lang.Object,IO<?>>> composition)
-
Uses of Fn1 in com.jnape.palatable.lambda.monad
Fields in com.jnape.palatable.lambda.monad declared as Fn1 Modifier and Type Field Description private Fn1<A,SafeT.Body<M,B>>
SafeT.Body.Suspended. f
Methods in com.jnape.palatable.lambda.monad that return Fn1 Modifier and Type Method Description private <Z> Fn1<SafeT.Body.Suspended<M,?,Z>,RecursiveResult<SafeT.Body<M,B>,Either<MonadRec<SafeT.Body<M,B>,M>,B>>>
SafeT.Body.Suspended. associateRight(Fn1<Z,SafeT.Body<M,B>> f)
Methods in com.jnape.palatable.lambda.monad with parameters of type Fn1 Modifier and Type Method Description <A> R
SafeT.Body.Suspended.Φ. apply(SafeT.Body<M,A> source, Fn1<A,SafeT.Body<M,B>> fn)
private <Z> Fn1<SafeT.Body.Suspended<M,?,Z>,RecursiveResult<SafeT.Body<M,B>,Either<MonadRec<SafeT.Body<M,B>,M>,B>>>
SafeT.Body.Suspended. associateRight(Fn1<Z,SafeT.Body<M,B>> f)
MonadError<E,A,M>
MonadError. catchError(Fn1<? super E,? extends Monad<A,M>> recoveryFn)
MonadWriter<W,A,MW>
MonadWriter. censor(Fn1<? super W,? extends W> fn)
Update the accumulated state.<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.default <B> Monad<B,M>
Monad. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadError<E,B,M>
MonadError. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadReader<R,B,MR>
MonadReader. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadRec<B,M>
MonadRec. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadWriter<W,B,MW>
MonadWriter. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> SafeT<M,B>
SafeT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> MonadWriter<W,Tuple2<A,B>,MW>
MonadWriter. listens(Fn1<? super W,? extends B> fn)
Map the accumulation into a value and pair it with the current output.MonadReader<R,A,MR>
MonadReader. local(Fn1<? super R,? extends R> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.<R> R
SafeT.Body.Done. match(Fn1<? super Either<MonadRec<SafeT.Body<M,A>,M>,A>,? extends R> aFn, Fn1<? super SafeT.Body.Suspended<M,?,A>,? extends R> bFn)
<R> R
SafeT.Body.More. match(Fn1<? super Either<MonadRec<SafeT.Body<M,A>,M>,A>,? extends R> aFn, Fn1<? super SafeT.Body.Suspended<M,?,A>,? extends R> bFn)
<R> R
SafeT.Body.Suspended. match(Fn1<? super Either<MonadRec<SafeT.Body<M,B>,M>,B>,? extends R> aFn, Fn1<? super SafeT.Body.Suspended<M,?,B>,? extends R> bFn)
private static <M extends MonadRec<?,M>,A,B>
SafeT.Body<M,B>SafeT.Body. suspend(SafeT.Body<M,A> freeA, Fn1<A,SafeT.Body<M,B>> fn)
<B> MonadRec<B,M>
MonadRec. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,M>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> SafeT<M,B>
SafeT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,SafeT<M,?>>> bounce)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.Method parameters in com.jnape.palatable.lambda.monad with type arguments of type Fn1 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 alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> Lazy<? extends MonadError<E,B,M>>
MonadError. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,M>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> Lazy<? extends MonadReader<R,B,MR>>
MonadReader. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,MR>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> Lazy<? extends MonadRec<B,M>>
MonadRec. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,M>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> Lazy<? extends MonadWriter<W,B,MW>>
MonadWriter. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,MW>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<SafeT<M,B>>
SafeT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,SafeT<M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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.default <B> MonadError<E,B,M>
MonadError. 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.default <B> MonadReader<R,B,MR>
MonadReader. zip(Applicative<Fn1<? super A,? extends B>,MR> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> MonadRec<B,M>
MonadRec. 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.default <B> MonadWriter<W,B,MW>
MonadWriter. zip(Applicative<Fn1<? super A,? extends B>,MW> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> SafeT<M,B>
SafeT. zip(Applicative<Fn1<? super A,? extends B>,SafeT<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.Constructors in com.jnape.palatable.lambda.monad with parameters of type Fn1 Constructor Description Suspended(SafeT.Body<M,A> source, Fn1<A,SafeT.Body<M,B>> f)
-
Uses of Fn1 in com.jnape.palatable.lambda.monad.transformer
Methods in com.jnape.palatable.lambda.monad.transformer with parameters of type Fn1 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.default <B> MonadT<M,B,MT,T>
MonadT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.Method parameters in com.jnape.palatable.lambda.monad.transformer with type arguments of type Fn1 Modifier and Type Method Description default <B> Lazy<? extends MonadT<M,B,MT,T>>
MonadT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,MT>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <B> MonadT<M,B,MT,T>
MonadT. zip(Applicative<Fn1<? super A,? extends B>,MT> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.monad.transformer.builtin
Fields in com.jnape.palatable.lambda.monad.transformer.builtin declared as Fn1 Modifier and Type Field Description private Fn1<? super R,? extends MonadRec<A,M>>
ReaderT. f
private Fn1<? super S,? extends MonadRec<Tuple2<A,S>,M>>
StateT. stateFn
private Fn1<? super Monoid<W>,? extends MonadRec<Tuple2<A,W>,M>>
WriterT. writerFn
Methods in com.jnape.palatable.lambda.monad.transformer.builtin with parameters of type Fn1 Modifier and Type Method Description <L2,R2>
EitherT<M,L2,R2>EitherT. biMap(Fn1<? super L,? extends L2> lFn, Fn1<? super R,? extends R2> rFn)
Dually map covariantly over both the left and right parameters.<L2> EitherT<M,L2,R>
EitherT. biMapL(Fn1<? super L,? extends L2> fn)
Covariantly map over the left parameter.<R2> EitherT<M,L,R2>
EitherT. biMapR(Fn1<? super R,? extends R2> fn)
Covariantly map over the right parameter.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)
StateT<S,M,A>
StateT. censor(Fn1<? super S,? extends S> fn)
Update the accumulated state.WriterT<W,M,A>
WriterT. censor(Fn1<? super W,? extends W> fn)
Update the accumulated state.<Q> ReaderT<Q,M,A>
ReaderT. contraMap(Fn1<? super Q,? extends R> fn)
Contravariantly mapA <- B
.<Q,B>
ReaderT<Q,M,B>ReaderT. diMap(Fn1<? super Q,? extends R> lFn, Fn1<? super A,? extends B> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.<Q> ReaderT<Q,M,A>
ReaderT. diMapL(Fn1<? super Q,? extends R> fn)
Contravariantly map over the left parameter.<B> ReaderT<R,M,B>
ReaderT. diMapR(Fn1<? super A,? extends B> fn)
Covariantly map over the right parameter.MaybeT<M,A>
MaybeT. filter(Fn1<? super A,? extends java.lang.Boolean> predicate)
If the embedded value is present and satisfiespredicate
then returnjust
the embedded value<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.<R2> EitherT<M,L,R2>
EitherT. fmap(Fn1<? super R,? extends R2> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> IdentityT<M,B>
IdentityT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> IterateT<M,B>
IterateT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> LazyT<M,B>
LazyT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> MaybeT<M,B>
MaybeT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> ReaderT<R,M,B>
ReaderT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> StateT<S,M,B>
StateT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> WriterT<W,M,B>
WriterT. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<MU extends MonadRec<Unit,M>>
MUIterateT. forEach(Fn1<? super A,? extends MonadRec<Unit,M>> fn)
static <S,M extends MonadRec<?,M>,A>
StateT<S,M,A>StateT. gets(Fn1<? super S,? extends MonadRec<A,M>> fn)
Given a function that produces a value inside amonadic effect
from a state, produce aStateT
that simply passes its state to the function and applies it.<B> StateT<S,M,Tuple2<A,B>>
StateT. listens(Fn1<? super S,? extends B> fn)
Map the accumulation into a value and pair it with the current output.<B> WriterT<W,M,Tuple2<A,B>>
WriterT. listens(Fn1<? super W,? extends B> fn)
Map the accumulation into a value and pair it with the current output.ReaderT<R,M,A>
ReaderT. local(Fn1<? super R,? extends R> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.StateT<S,M,A>
StateT. local(Fn1<? super S,? extends S> fn)
Modify thisMonadReader's
environment after reading it but before running the effect.<MA extends MonadRec<A,M>,N extends MonadRec<?,N>,B>
ReaderT<R,N,B>ReaderT. mapReaderT(Fn1<? super MA,? extends MonadRec<B,N>> fn)
<N extends MonadRec<?,N>,B>
StateT<S,N,B>StateT. mapStateT(Fn1<? super MonadRec<Tuple2<A,S>,M>,? extends MonadRec<Tuple2<B,S>,N>> fn)
Map both the result and the final state to a new result and final state inside theMonad
.static <S,M extends MonadRec<?,M>>
StateT<S,M,Unit>StateT. modify(Fn1<? super S,? extends MonadRec<S,M>> updateFn)
static <R,M extends MonadRec<?,M>,A>
ReaderT<R,M,A>ReaderT. readerT(Fn1<? super R,? extends MonadRec<A,M>> fn)
static <S,M extends MonadRec<?,M>,A>
StateT<S,M,A>StateT. stateT(Fn1<? super S,? extends MonadRec<Tuple2<A,S>,M>> stateFn)
Lift a state-sensitivemonadically embedded
computation intoStateT
.<R2> EitherT<M,L,R2>
EitherT. trampolineM(Fn1<? super R,? extends MonadRec<RecursiveResult<R,R2>,EitherT<M,L,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> IdentityT<M,B>
IdentityT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,IdentityT<M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> IterateT<M,B>
IterateT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,IterateT<M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> LazyT<M,B>
LazyT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,LazyT<M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> MaybeT<M,B>
MaybeT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,MaybeT<M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> ReaderT<R,M,B>
ReaderT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,ReaderT<R,M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> StateT<S,M,B>
StateT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,StateT<S,M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B> WriterT<W,M,B>
WriterT. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,WriterT<W,M,?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.static <M extends MonadRec<?,M>,A,B>
IterateT<M,A>IterateT. unfold(Fn1<? super B,? extends MonadRec<Maybe<Tuple2<A,B>>,M>> fn, MonadRec<B,M> mb)
StateT<S,M,A>
StateT. withStateT(Fn1<? super S,? extends MonadRec<S,M>> fn)
Map the final state to a new final state inside the samemonadic effect
using the provided function.Method parameters in com.jnape.palatable.lambda.monad.transformer.builtin with type arguments of type Fn1 Modifier and Type Method Description <R2> Lazy<EitherT<M,L,R2>>
EitherT. lazyZip(Lazy<? extends Applicative<Fn1<? super R,? extends R2>,EitherT<M,L,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<IdentityT<M,B>>
IdentityT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,IdentityT<M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<IterateT<M,B>>
IterateT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,IterateT<M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<LazyT<M,B>>
LazyT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,LazyT<M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<MaybeT<M,B>>
MaybeT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,MaybeT<M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<ReaderT<R,M,B>>
ReaderT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,ReaderT<R,M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<StateT<S,M,B>>
StateT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,StateT<S,M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Lazy<WriterT<W,M,B>>
WriterT. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,WriterT<W,M,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<R2> EitherT<M,L,R2>
EitherT. zip(Applicative<Fn1<? super R,? extends R2>,EitherT<M,L,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> IdentityT<M,B>
IdentityT. zip(Applicative<Fn1<? super A,? extends B>,IdentityT<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.<B> IterateT<M,B>
IterateT. zip(Applicative<Fn1<? super A,? extends B>,IterateT<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.<B> LazyT<M,B>
LazyT. zip(Applicative<Fn1<? super A,? extends B>,LazyT<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.<B> MaybeT<M,B>
MaybeT. zip(Applicative<Fn1<? super A,? extends B>,MaybeT<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.<B> ReaderT<R,M,B>
ReaderT. zip(Applicative<Fn1<? super A,? extends B>,ReaderT<R,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.<B> StateT<S,M,B>
StateT. zip(Applicative<Fn1<? super A,? extends B>,StateT<S,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.<B> WriterT<W,M,B>
WriterT. zip(Applicative<Fn1<? super A,? extends B>,WriterT<W,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.Constructors in com.jnape.palatable.lambda.monad.transformer.builtin with parameters of type Fn1 Constructor Description ReaderT(Fn1<? super R,? extends MonadRec<A,M>> f)
StateT(Fn1<? super S,? extends MonadRec<Tuple2<A,S>,M>> stateFn)
WriterT(Pure<M> pureM, Fn1<? super Monoid<W>,? extends MonadRec<Tuple2<A,W>,M>> writerFn)
-
Uses of Fn1 in com.jnape.palatable.lambda.monoid
Subinterfaces of Fn1 in com.jnape.palatable.lambda.monoid Modifier and Type Interface Description interface
Monoid<A>
Methods in com.jnape.palatable.lambda.monoid with parameters of type Fn1 Modifier and Type Method Description default <B> A
Monoid. foldMap(Fn1<? super B,? extends A> fn, java.lang.Iterable<B> bs)
Homomorphism combined with catamorphism. -
Uses of Fn1 in com.jnape.palatable.lambda.monoid.builtin
Classes in com.jnape.palatable.lambda.monoid.builtin that implement Fn1 Modifier and Type Class Description class
AddAll<A,C extends java.util.Collection<A>>
TheMonoid
instance formed under mutative concatenation for an arbitraryCollection
.class
And
AMonoid
instance formed byBoolean
.class
Collapse<_1,_2>
class
Compose<A>
class
Concat<A>
TheMonoid
instance formed under concatenation for an arbitraryIterable
.class
Endo<A>
class
EndoK<M extends MonadRec<?,M>,A,MA extends MonadRec<A,M>>
The monoid formed under monadic endomorphism.class
First<A>
class
Join
AMonoid
instance formed byString
that concats two strings together.class
Last<A>
class
LeftAll<L,R>
class
LeftAny<L,R>
class
Merge<L,R>
AMonoid
instance 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
.class
MergeHMaps
AMonoid
instance formed by mergingHMaps
using the chosenTypeSafeKey
->Semigroup
mappings
, defaulting toLast
in case noSemigroup
has been chosen for a givenTypeSafeKey
.class
MergeMaps<K,V>
class
Or
AMonoid
instance formed byBoolean
.class
Present<A>
class
PutAll
class
RightAll<L,R>
class
RightAny<L,R>
class
RunAll<A>
class
Trivial
class
Union<A>
class
Xor
Logical exclusive-or.Methods in com.jnape.palatable.lambda.monoid.builtin that return Fn1 Modifier and Type Method Description static <A,C extends java.util.Collection<A>>
Fn1<C,C>AddAll. addAll(Fn0<C> collectionFn0, C xs)
static Fn1<java.lang.Boolean,java.lang.Boolean>
And. and(java.lang.Boolean x)
Fn1<A,A>
Endo. checkedApply(Fn1<A,A> f, Fn1<A,A> g)
static <_1,_2>
Fn1<Tuple2<_1,_2>,Tuple2<_1,_2>>Collapse. collapse(Monoid<_1> _1Monoid, Monoid<_2> _2Monoid, Tuple2<_1,_2> x)
static <A> Fn1<java.util.concurrent.CompletableFuture<A>,java.util.concurrent.CompletableFuture<A>>
Compose. compose(Monoid<A> aMonoid, java.util.concurrent.CompletableFuture<A> x)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Concat. concat(java.lang.Iterable<A> xs)
static <A> Fn1<A,A>
Endo. endo(Fn1<A,A> f, Fn1<A,A> g)
static <A> Fn1<Maybe<A>,Maybe<A>>
First. first(Maybe<A> x)
Fn1<A,A>
Endo. identity()
static Fn1<java.lang.String,java.lang.String>
Join. join(java.lang.String x)
static <A> Fn1<Maybe<A>,Maybe<A>>
Last. last(Maybe<A> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>LeftAll. leftAll(Monoid<L> lMonoid, Either<L,R> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>LeftAny. leftAny(Monoid<L> lMonoid, Either<L,R> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>Merge. merge(Semigroup<L> lSemigroup, Monoid<R> rMonoid, Either<L,R> x)
static <K,V>
Fn1<java.util.Map<K,V>,java.util.Map<K,V>>MergeMaps. mergeMaps(Fn0<java.util.Map<K,V>> mFn0, Semigroup<V> semigroup, java.util.Map<K,V> x)
static Fn1<java.lang.Boolean,java.lang.Boolean>
Or. or(java.lang.Boolean x)
static <A> Fn1<Maybe<A>,Maybe<A>>
Present. present(Semigroup<A> aSemigroup, Maybe<A> x)
static Fn1<HMap,HMap>
PutAll. putAll(HMap x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>RightAll. rightAll(Monoid<R> rMonoid, Either<L,R> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>RightAny. rightAny(Monoid<R> rMonoid, Either<L,R> x)
static <A> Fn1<IO<A>,IO<A>>
RunAll. runAll(Monoid<A> monoid, IO<A> x)
static Fn1<Unit,Unit>
Trivial. trivial(Unit x)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Union. union(java.lang.Iterable<A> xs)
static Fn1<java.lang.Boolean,java.lang.Boolean>
Xor. xor(java.lang.Boolean x)
Methods in com.jnape.palatable.lambda.monoid.builtin that return types with arguments of type Fn1 Modifier and Type Method Description Fn2<Fn1<A,A>,A,A>
Endo. apply(Fn1<A,A> f)
Monoid<Fn1<A,MA>>
EndoK. checkedApply(Pure<M> pureM)
static <A> Fn2<Fn1<A,A>,A,A>
Endo. endo(Fn1<A,A> f)
static <M extends MonadRec<?,M>,A,MA extends MonadRec<A,M>>
Monoid<Fn1<A,MA>>EndoK. endoK(Pure<M> pureM)
Methods in com.jnape.palatable.lambda.monoid.builtin with parameters of type Fn1 Modifier and Type Method Description Fn2<Fn1<A,A>,A,A>
Endo. apply(Fn1<A,A> f)
A
Endo. apply(Fn1<A,A> f, Fn1<A,A> g, A a)
Fn1<A,A>
Endo. checkedApply(Fn1<A,A> f, Fn1<A,A> g)
static <A> Fn2<Fn1<A,A>,A,A>
Endo. endo(Fn1<A,A> f)
static <A> Fn1<A,A>
Endo. endo(Fn1<A,A> f, Fn1<A,A> g)
static <A> A
Endo. endo(Fn1<A,A> f, Fn1<A,A> g, A a)
<B> java.lang.Boolean
And. foldMap(Fn1<? super B,? extends java.lang.Boolean> fn, java.lang.Iterable<B> bs)
<B> java.lang.Iterable<A>
Concat. foldMap(Fn1<? super B,? extends java.lang.Iterable<A>> fn, java.lang.Iterable<B> bs)
<B> Maybe<A>
First. foldMap(Fn1<? super B,? extends Maybe<A>> fn, java.lang.Iterable<B> bs)
<B> HMap
MergeHMaps. foldMap(Fn1<? super B,? extends HMap> fn, java.lang.Iterable<B> bs)
<B> java.lang.Boolean
Or. foldMap(Fn1<? super B,? extends java.lang.Boolean> fn, java.lang.Iterable<B> bs)
-
Uses of Fn1 in com.jnape.palatable.lambda.optics
Methods in com.jnape.palatable.lambda.optics that return Fn1 Modifier and Type Method Description default <CoP extends Profunctor<?,?,? extends P>,CoF extends Functor<?,? extends F>,FB extends Functor<B,? extends CoF>,FT extends Functor<T,? extends CoF>,PAFB extends Profunctor<A,FB,? extends CoP>,PSFT extends Profunctor<S,FT,? extends CoP>>
Fn1<PAFB,PSFT>Optic. monomorphize()
Methods in com.jnape.palatable.lambda.optics that return types with arguments of type Fn1 Modifier and Type Method Description default Tuple2<Fn1<? super S,? extends A>,Fn1<? super B,? extends T>>
Iso. unIso()
default Tuple2<Fn1<? super S,? extends A>,Fn1<? super B,? extends T>>
Iso. unIso()
default Tuple2<Fn1<? super B,? extends T>,Fn1<? super S,? extends Either<T,A>>>
Prism. unPrism()
default Tuple2<Fn1<? super B,? extends T>,Fn1<? super S,? extends Either<T,A>>>
Prism. unPrism()
Methods in com.jnape.palatable.lambda.optics with parameters of type Fn1 Modifier and Type Method Description default <R> Iso<R,T,A,B>
Iso. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.default <R> Lens<R,T,A,B>
Lens. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.default <R> Prism<R,T,A,B>
Prism. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.default <R,U>
Iso<R,U,A,B>Iso. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <R,U>
Lens<R,U,A,B>Lens. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <R,U>
Prism<R,U,A,B>Prism. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <R> Iso<R,T,A,B>
Iso. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.default <R> Lens<R,T,A,B>
Lens. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.default <R> Prism<R,T,A,B>
Prism. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.default <U> Iso<S,U,A,B>
Iso. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.default <U> Lens<S,U,A,B>
Lens. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.default <U> Prism<S,U,A,B>
Prism. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.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.default <U> Iso<S,U,A,B>
Iso. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <U> Lens<S,U,A,B>
Lens. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.default <U> Prism<S,U,A,B>
Prism. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.static <S,A,B>
Prism<S,S,A,B>Prism. fromPartial(Fn1<? super S,? extends A> partialSa, Fn1<? super B,? extends S> bs)
Static factory method for creating aPrism
from a partial functionS -> A
and a total functionB -> S
.static <S,A>
Prism.Simple<S,A>Prism.Simple. fromPartial(Fn1<? super S,? extends A> partialSa, Fn1<? super A,? extends S> as)
Static factory method for creating asimple Prism
from a partial functionS -> A
and a total functionA -> T
.static <S,T,A,B>
Iso<S,T,A,B>Iso. iso(Fn1<? super S,? extends A> f, Fn1<? super B,? extends T> g)
Static factory method for creating an iso from a function and it's inverse.static <S,T,A,B>
Lens<S,T,A,B>Lens. lens(Fn1<? super S,? extends A> getter, Fn2<? super S,? super B,? extends T> setter)
Static factory method for creating a lens from a getter function and a setter function.default <C> Iso<S,T,C,B>
Iso. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <C> Lens<S,T,C,B>
Lens. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <C> Optic<P,F,S,T,C,B>
Optic. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <C> Prism<S,T,C,B>
Prism. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <C> ProtoOptic<P,S,T,C,B>
ProtoOptic. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <Z> Iso<S,T,A,Z>
Iso. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <Z> Lens<S,T,A,Z>
Lens. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <Z> Optic<P,F,S,T,A,Z>
Optic. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <Z> Prism<S,T,A,Z>
Prism. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <Z> ProtoOptic<P,S,T,A,Z>
ProtoOptic. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <R> Iso<R,T,A,B>
Iso. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <R> Lens<R,T,A,B>
Lens. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <R> Optic<P,F,R,T,A,B>
Optic. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <R> Prism<R,T,A,B>
Prism. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <R> ProtoOptic<P,R,T,A,B>
ProtoOptic. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <U> Iso<S,U,A,B>
Iso. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.default <U> Lens<S,U,A,B>
Lens. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.default <U> Optic<P,F,S,U,A,B>
Optic. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.default <U> Prism<S,U,A,B>
Prism. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.default <U> ProtoOptic<P,S,U,A,B>
ProtoOptic. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.static <P extends Profunctor<?,?,? extends P>,F extends Functor<?,? extends F>,S,T,A,B,FB extends Functor<B,? extends F>,FT extends Functor<T,? extends F>,PAFB extends Profunctor<A,FB,? extends P>,PSFT extends Profunctor<S,FT,? extends P>>
Optic<P,F,S,T,A,B>Optic. optic(Fn1<PAFB,PSFT> fn)
Promote a monomorphic function to a compatibleOptic
.static <S,T,A,B>
Prism<S,T,A,B>Prism. prism(Fn1<? super S,? extends CoProduct2<T,A,?>> sta, Fn1<? super B,? extends T> bt)
static <S,A,B>
Pure<Iso<S,?,A,B>>Iso. pureIso(Fn1<? super S,? extends A> sa)
static <S,A,B>
Pure<Lens<S,?,A,B>>Lens. pureLens(Fn1<? super S,? extends A> sa)
static <S,A>
Iso.Simple<S,A>Iso. simpleIso(Fn1<? super S,? extends A> f, Fn1<? super A,? extends S> g)
Static factory method for creating a simpleIso
from a function and its inverse.static <S,A>
Lens.Simple<S,A>Lens. simpleLens(Fn1<? super S,? extends A> getter, Fn2<? super S,? super A,? extends S> setter)
Static factory method for creating a simple lens from a getter function and a setter function.static <S,A>
Prism.Simple<S,A>Prism. simplePrism(Fn1<? super S,? extends Maybe<A>> sMaybeA, Fn1<? super A,? extends S> as)
Static factory method for creating a simplePrism
from a function and its potentially failing inverse.default <U> Iso<S,U,A,B>
Iso. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Iso<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Lens<S,U,A,B>
Lens. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Lens<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Prism<S,U,A,B>
Prism. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Prism<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.Method parameters in com.jnape.palatable.lambda.optics with type arguments of type Fn1 Modifier and Type Method Description default <U> Lazy<Prism<S,U,A,B>>
Prism. lazyZip(Lazy<? extends Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <U> Iso<S,U,A,B>
Iso. zip(Applicative<Fn1<? super T,? extends U>,Iso<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <U> Lens<S,U,A,B>
Lens. zip(Applicative<Fn1<? super T,? extends U>,Lens<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <U> Prism<S,U,A,B>
Prism. zip(Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Fn1 in com.jnape.palatable.lambda.optics.functions
Classes in com.jnape.palatable.lambda.optics.functions that implement Fn1 Modifier and Type Class Description class
Matching<S,T,A,B>
class
Over<S,T,A,B>
Given anOptic
, a function fromA
toB
, and a "larger" valueS
, produce aT
by retrieving theA
from theS
, applying the function, and updating theS
with theB
resulting from the function.class
Pre<P extends Profunctor<?,?,? extends P>,S,T,A,B>
class
Re<S,T,A,B>
Turn anOptic
with a unary mapping that can be used for setting (e.g.class
Set<S,T,A,B>
class
Under<S,T,A,B>
class
View<S,T,A,B>
Methods in com.jnape.palatable.lambda.optics.functions that return Fn1 Modifier and Type Method Description static <S,T,A,B>
Fn1<S,Either<T,A>>Matching. matching(Optic<? super Market<A,B,?,?>,? super Identity<?>,S,T,A,B> optic)
static <S,T,A,B>
Fn1<S,T>Over. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn)
static <S,T,A,B>
Fn1<S,T>Set. set(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, B b)
static <S,T,A,B>
Fn1<B,A>Under. under(Optic<? super Exchange<A,B,?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super T,? extends S> fn)
static <S,T,A,B>
Fn1<S,A>View. view(Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B> optic)
Methods in com.jnape.palatable.lambda.optics.functions that return types with arguments of type Fn1 Modifier and Type Method Description static <S,T,A,B>
Fn2<Fn1<? super A,? extends B>,S,T>Over. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic)
static <S,T,A,B>
Fn2<Fn1<? super T,? extends S>,B,A>Under. under(Optic<? super Exchange<A,B,?,?>,? super Identity<?>,S,T,A,B> optic)
Methods in com.jnape.palatable.lambda.optics.functions with parameters of type Fn1 Modifier and Type Method Description T
Over. checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
A
Under. checkedApply(Optic<? super Exchange<A,B,?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super T,? extends S> fn, B b)
static <S,T,A,B>
Fn1<S,T>Over. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn)
static <S,T,A,B>
TOver. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
static <S,T,A,B>
Fn1<B,A>Under. under(Optic<? super Exchange<A,B,?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super T,? extends S> fn)
static <S,T,A,B>
AUnder. under(Optic<? super Exchange<A,B,?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super T,? extends S> fn, B b)
Method parameters in com.jnape.palatable.lambda.optics.functions with type arguments of type Fn1 Modifier and Type Method Description T
Over. checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
T
Set. checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, B b, S s)
A
View. checkedApply(Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B> optic, S s)
static <S,T,A,B>
Fn2<Fn1<? super A,? extends B>,S,T>Over. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic)
static <S,T,A,B>
Fn1<S,T>Over. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn)
static <S,T,A,B>
TOver. over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
static <S,T,A,B>
Fn2<B,S,T>Set. set(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic)
static <S,T,A,B>
Fn1<S,T>Set. set(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, B b)
static <S,T,A,B>
TSet. set(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, B b, S s)
static <S,T,A,B>
Fn1<S,A>View. view(Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B> optic)
static <S,T,A,B>
AView. view(Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B> optic, S s)
-
Uses of Fn1 in com.jnape.palatable.lambda.optics.lenses
Methods in com.jnape.palatable.lambda.optics.lenses with parameters of type Fn1 Modifier and Type Method Description static <X,CX extends java.util.Collection<X>>
Lens.Simple<CX,CX>CollectionLens. asCopy(Fn1<? super CX,? extends CX> copyFn)
Convenience static factory method for creating a lens that focuses on a copy of aCollection
, given a function that creates the copy.static <M extends java.util.Map<K,V>,K,V>
Lens<java.util.Map<K,V>,M,M,M>MapLens. asCopy(Fn1<? super java.util.Map<K,V>,? extends M> copyFn)
A lens that focuses on a copy of aMap
as a subtypeM
.static <X,CX extends java.util.Collection<X>>
Lens.Simple<CX,java.util.Set<X>>CollectionLens. asSet(Fn1<? super CX,? extends CX> copyFn)
Convenience static factory method for creating a lens that focuses on an arbitraryCollection
as aSet
.static <X,CX extends java.util.Collection<X>>
Lens.Simple<CX,java.util.stream.Stream<X>>CollectionLens. asStream(Fn1<? super CX,? extends CX> copyFn)
Convenience static factory method for creating a lens that focuses on a Collection as a Stream.static <A,SetA extends java.util.Set<A>>
Lens.Simple<SetA,java.lang.Boolean>SetLens. contains(Fn1<? super SetA,? extends SetA> copyFn, A a)
A lens that focuses on whether aSet
contains some valuea
.static <M extends java.util.Map<K,V>,K,V>
Lens<java.util.Map<K,V>,M,Maybe<V>,Maybe<V>>MapLens. valueAt(Fn1<? super java.util.Map<K,V>,? extends M> copyFn, K k)
A lens that focuses on a value at a key in a map, as aMaybe
, and produces a subtypeM
on the way back out. -
Uses of Fn1 in com.jnape.palatable.lambda.optics.prisms
Methods in com.jnape.palatable.lambda.optics.prisms with parameters of type Fn1 Modifier and Type Method Description static <M extends java.util.Map<K,V>,K,V>
Prism<java.util.Map<K,V>,M,V,V>MapPrism. valueAt(Fn1<java.util.Map<K,V>,M> copyFn, K k)
APrism
that focuses on the value at a key in aMap
, and produces an instance ofM
on the way back out. -
Uses of Fn1 in com.jnape.palatable.lambda.semigroup
Subinterfaces of Fn1 in com.jnape.palatable.lambda.semigroup Modifier and Type Interface Description interface
Semigroup<A>
ASemigroup
is a closed, associative category. -
Uses of Fn1 in com.jnape.palatable.lambda.semigroup.builtin
Classes in com.jnape.palatable.lambda.semigroup.builtin that implement Fn1 Modifier and Type Class Description class
Absent<A>
class
Collapse<_1,_2>
class
Compose<A>
class
Intersection<A>
Given twoIterables
xs
andys
, return thedistinct
elements ofxs
that are also inys
in order of their unique occurrence inxs
.class
LeftAll<L,R>
class
LeftAny<L,R>
class
Max<A extends java.lang.Comparable<A>>
ASemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly less thany
, returny
Otherwise, returnx
class
MaxBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
, produce aSemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly less thany
in terms ofB
, returny
Otherwise, returnx
class
MaxWith<A>
Given a comparator for some typeA
, produce aSemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly less thany
in terms ofB
, returny
Otherwise, returnx
class
Merge<L,R>
class
Min<A extends java.lang.Comparable<A>>
ASemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly greater thany
, returny
Otherwise, returnx
class
MinBy<A,B extends java.lang.Comparable<B>>
Given a mapping function from some typeA
to someComparable
typeB
, produce aSemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly greater thany
in terms ofB
, returny
Otherwise, returnx
class
MinWith<A>
Given a comparator for some typeA
, produce aSemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly greater thany
in terms ofB
, returny
Otherwise, returnx
class
RightAll<L,R>
class
RightAny<L,R>
class
RunAll<A>
Methods in com.jnape.palatable.lambda.semigroup.builtin that return Fn1 Modifier and Type Method Description static <A> Fn1<Maybe<A>,Maybe<A>>
Absent. absent(Semigroup<A> aSemigroup, Maybe<A> x)
static <_1,_2>
Fn1<Tuple2<_1,_2>,Tuple2<_1,_2>>Collapse. collapse(Semigroup<_1> _1Semigroup, Semigroup<_2> _2Semigroup, Tuple2<_1,_2> x)
static <A> Fn1<java.util.concurrent.CompletableFuture<A>,java.util.concurrent.CompletableFuture<A>>
Compose. compose(Semigroup<A> aSemigroup, java.util.concurrent.CompletableFuture<A> x)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
Intersection. intersection(java.lang.Iterable<A> xs)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>LeftAll. leftAll(Semigroup<L> lSemigroup, Either<L,R> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>LeftAny. leftAny(Semigroup<L> lSemigroup, Either<L,R> x)
static <A extends java.lang.Comparable<A>>
Fn1<A,A>Max. max(A x)
static <A,B extends java.lang.Comparable<B>>
Fn1<A,A>MaxBy. maxBy(Fn1<? super A,? extends B> compareFn, A x)
static <A> Fn1<A,A>
MaxWith. maxWith(java.util.Comparator<A> compareFn, A x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>Merge. merge(Semigroup<L> lSemigroup, Semigroup<R> rSemigroup, Either<L,R> x)
static <A extends java.lang.Comparable<A>>
Fn1<A,A>Min. min(A x)
static <A,B extends java.lang.Comparable<B>>
Fn1<A,A>MinBy. minBy(Fn1<? super A,? extends B> compareFn, A x)
static <A> Fn1<A,A>
MinWith. minWith(java.util.Comparator<A> compareFn, A x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>RightAll. rightAll(Semigroup<R> rSemigroup, Either<L,R> x)
static <L,R>
Fn1<Either<L,R>,Either<L,R>>RightAny. rightAny(Semigroup<R> rSemigroup, Either<L,R> x)
static <A> Fn1<IO<A>,IO<A>>
RunAll. runAll(Semigroup<A> semigroup, IO<A> ioX)
Methods in com.jnape.palatable.lambda.semigroup.builtin with parameters of type Fn1 Modifier and Type Method Description Semigroup<A>
MaxBy. checkedApply(Fn1<? super A,? extends B> compareFn)
Semigroup<A>
MinBy. checkedApply(Fn1<? super A,? extends B> compareFn)
static <A,B extends java.lang.Comparable<B>>
Semigroup<A>MaxBy. maxBy(Fn1<? super A,? extends B> compareFn)
static <A,B extends java.lang.Comparable<B>>
Fn1<A,A>MaxBy. maxBy(Fn1<? super A,? extends B> compareFn, A x)
static <A,B extends java.lang.Comparable<B>>
AMaxBy. maxBy(Fn1<? super A,? extends B> compareFn, A x, A y)
static <A,B extends java.lang.Comparable<B>>
Semigroup<A>MinBy. minBy(Fn1<? super A,? extends B> compareFn)
static <A,B extends java.lang.Comparable<B>>
Fn1<A,A>MinBy. minBy(Fn1<? super A,? extends B> compareFn, A x)
static <A,B extends java.lang.Comparable<B>>
AMinBy. minBy(Fn1<? super A,? extends B> compareFn, A x, A y)
-
Uses of Fn1 in com.jnape.palatable.lambda.traversable
Methods in com.jnape.palatable.lambda.traversable with parameters of type Fn1 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.<B> LambdaIterable<B>
LambdaIterable. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<C> LambdaMap<A,C>
LambdaMap. fmap(Fn1<? super B,? extends C> fn)
default <B> Traversable<B,T>
Traversable. fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.<B> LambdaIterable<B>
LambdaIterable. trampolineM(Fn1<? super A,? extends MonadRec<RecursiveResult<A,B>,LambdaIterable<?>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.<B,App extends Applicative<?,App>,TravB extends Traversable<B,LambdaIterable<?>>,AppTrav extends Applicative<TravB,App>>
AppTravLambdaIterable. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.<C,App extends Applicative<?,App>,TravC extends Traversable<C,LambdaMap<A,?>>,AppTrav extends Applicative<TravC,App>>
AppTravLambdaMap. traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravC,? extends AppTrav> pure)
<B,App extends Applicative<?,App>,TravB extends Traversable<B,T>,AppTrav extends Applicative<TravB,App>>
AppTravTraversable. traverse(Fn1<? super A,? extends Applicative<B,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
Applyfn
to each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.Method parameters in com.jnape.palatable.lambda.traversable with type arguments of type Fn1 Modifier and Type Method Description <B> Lazy<LambdaIterable<B>>
LambdaIterable. lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,LambdaIterable<?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> LambdaIterable<B>
LambdaIterable. zip(Applicative<Fn1<? super A,? extends B>,LambdaIterable<?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.
-