Uses of Interface
com.jnape.palatable.lambda.functions.Fn1
Packages that use Fn1
Package
Description
-
Uses of Fn1 in com.jnape.palatable.lambda.adt
Methods in com.jnape.palatable.lambda.adt with parameters of type Fn1Modifier and TypeMethodDescriptionfinal <L2,
R2> Either <L2, R2> Dually map covariantly over both the left and right parameters.final <C,
D> These <C, D> Dually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Try.catching
(Fn1<? super Throwable, ? extends Boolean> predicate, Fn1<? super Throwable, ? extends A> recoveryFn) Catch any thrownT
satisfyingpredicate
and map it to a success value.Catch any instance ofthrowableType
and map it to a success value.If this is a right value, applypred
to it.If this is a right value, applypred
to it.If this value is present and satisfiespredicate
, returnjust
the value; otherwise, returnnothing
.If a right value, unwrap it and apply it torightFn
, returning the resultingEither<L ,R>
.final <B> Maybe
<B> Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.<B> Try
<B> Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.final <B> Maybe
<B> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.<B> Try
<B> Covariantly transmute this functor's parameter using the given mapping function.final L
Inverse of recover.final Throwable
If this is a failure, return the wrapped value.<V> V
abstract <V> V
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
<R> R
<R> R
<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
<R> R
Return the wrapped value if this is a right; otherwise, map the wrapped left value to aT
and throw it.If this is a success value, return it.Deprecated.final R
"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.final A
If this is a success, return the wrapped value.If this is a success, wrap the value in aEither.right(R)
and return it.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.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.final <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.final <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> Attempt to execute theFn0
, returning its result in a right value.Either.trying
(SideEffect sideEffect, Fn1<? super Throwable, ? extends L> leftFn) Attempt to execute theSideEffect
, returningUnit
in a right value.static <A extends AutoCloseable,
B extends AutoCloseable, C extends 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 AutoCloseable,
B extends 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 AutoCloseable,
B>
Try<B> Try.withResources
(Fn0<? extends A> fn0, Fn1<? super A, ? extends Try<? extends B>> fn) Given aFn0
<AutoCloseable
>aSupplier
and anFn1
fn
, applyfn
to the result ofaSupplier
, ensuring that the result has itsclose
method invoked, regardless of the outcome.Method parameters in com.jnape.palatable.lambda.adt with type arguments of type Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Terminate early if this is aMaybe.Nothing
; otherwise, continue thezip
.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.final <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.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 Fn1Modifier and TypeMethodDescriptionfinal <C,
D> Choice2 <C, D> Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.<R> R
<R> R
<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) 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.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.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.Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.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.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.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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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.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.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.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.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 Fn1Modifier and TypeMethodDescriptiondefault CoProduct2
<A, B, ? extends CoProduct2<A, B, ?>> 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, ?>> 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, ?>> Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.default <R> R
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
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 Fn1Modifier and TypeMethodDescription<_1Prime,
_2Prime>
Tuple2<_1Prime, _2Prime> Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Dually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the left parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.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.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.<_1Prime> SingletonHList
<_1Prime> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.<R> R
ApplyHList.HCons.head()
tofn
and return the result.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.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.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.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.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.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.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.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 Fn1Modifier and TypeMethodDescription<_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.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.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.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.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.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.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.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.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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.functionsModifier and TypeInterfaceDescriptioninterface
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 Fn1Modifier and TypeMethodDescriptionPartially apply this function by passing its first argument.Partially apply this function by taking its first two arguments.Partially apply this function by taking its first three arguments.Partially apply this function by taking its first four arguments.Partially apply this function by taking its first five arguments.Partially apply this function by taking its first six arguments.Partially apply this function by taking its first seven arguments.Fn1.carry()
Pair the covariantly-positioned carrier type with the contravariantly-positioned carrier type.Fn1.cartesian()
Pair a value with the input to this function, and preserve the paired value through to the output.Update the accumulated state.Fn2.checkedApply
(A a) Invoke this function with the given argument, potentially throwing anyThrowable
.Fn3.checkedApply
(A a, B b) Fn4.checkedApply
(A a, B b, C c) Fn5.checkedApply
(A a, B b, C c, D d) Fn1.choose()
Choose between a successful resultb
or returning back the input,a
.Fn1.cocartesian()
Choose between either applying this function or returning back a different result altogether.Contravariantly mapA <- B
.default <Z,
C> Fn1 <Z, C> Exercise bothdiMapL
anddiMapR
over this function in the same invocation.Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.Covariantly map over the return value of this function, producing a function that takes the same argument, and produces the new result type.Fn1.discardL
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.Fn1.discardR
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Chain dependent computations that may continue or short-circuit based on previous results.Left-to-right composition.static <A,
B> Fn1 <A, B> Static factory method for avoid explicit casting when using method references asFn1
s.static <A,
B> Fn1 <A, B> Fn1.fromFunction
(Function<? super A, ? extends B> function) Map the accumulation into a value and pair it with the current output.Modify thisMonadReader's
environment after reading it but before running the effect.Fn1.pure
(C c) Lift the valueb
into this applicative functor.Fn1.self()
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.Fn2.uncurry()
static <A,
B> Fn1 <A, B> Construct anFn1
that has a reference to itself in scope at the time it is executed (presumably for recursive invocations).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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Fn1.pureFn1()
Methods in com.jnape.palatable.lambda.functions with parameters of type Fn1Modifier and TypeMethodDescriptionUpdate the accumulated state.default <Z> Effect
<Z> Contravariantly mapA <- B
.Contravariantly mapA <- B
.Contravariantly mapA <- B
.static <A,
B, C> Fn2 <A, B, C> static <A,
B, C> Fn2 <A, B, C> default <Z,
C> Fn1 <Z, C> Exercise bothdiMapL
anddiMapR
over this function in the same invocation.default <Z> Effect
<Z> Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <B> Fn0
<B> 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> default <B> Fn0
<B> Chain dependent computations that may continue or short-circuit based on previous results.default <B> Fn0
<B> Left-to-right composition.static <A> Fn0
<A> static <A,
B> Fn1 <A, B> Static factory method for avoid explicit casting when using method references asFn1
s.static <A,
B, C, D>
Fn3<A, B, C, D> static <A,
B, C, D, E>
Fn4<A, B, C, D, E> static <A,
B, C, D, E, F>
Fn5<A, B, C, D, E, F> static <A,
B, C, D, E, F, G>
Fn6<A, B, C, D, E, F, G> static <A,
B, C, D, E, F, G, H>
Fn7<A, B, C, D, E, F, G, H> static <A,
B, C, D, E, F, G, H, I>
Fn8<A, B, C, D, E, F, G, H, I> Map the accumulation into a value and pair it with the current output.Modify thisMonadReader's
environment after reading it but before running the effect.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 Fn1Modifier and TypeMethodDescriptionstatic <A,
B, C> Fn2 <A, B, C> default <B> Fn0
<B> Fn0.discardL
(Applicative<B, Fn1<Unit, ?>> appB) Fn1.discardL
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.Effect.discardR
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Fn0.discardR
(Applicative<B, Fn1<Unit, ?>> appB) Fn1.discardR
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Fn2.discardR
(Applicative<D, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Fn3.discardR
(Applicative<E, Fn1<A, ?>> appB) Fn4.discardR
(Applicative<F, Fn1<A, ?>> appB) Fn5.discardR
(Applicative<G, Fn1<A, ?>> appB) Fn6.discardR
(Applicative<H, Fn1<A, ?>> appB) Fn7.discardR
(Applicative<I, Fn1<A, ?>> appB) Fn8.discardR
(Applicative<J, Fn1<A, ?>> appB) default <B> Fn0
<B> Chain dependent computations that may continue or short-circuit based on previous results.static <A,
B, C, D>
Fn3<A, B, C, D> static <A,
B, C, D, E>
Fn4<A, B, C, D, E> static <A,
B, C, D, E, F>
Fn5<A, B, C, D, E, F> static <A,
B, C, D, E, F, G>
Fn6<A, B, C, D, E, F, G> static <A,
B, C, D, E, F, G, H>
Fn7<A, B, C, D, E, F, G, H> static <A,
B, C, D, E, F, G, H, I>
Fn8<A, B, C, D, E, F, G, H, I> Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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> Construct anFn1
that has a reference to itself in scope at the time it is executed (presumably for recursive invocations).default <B> Fn0
<B> default <B> Fn0
<B> Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 Fn1Modifier and TypeClassDescriptionfinal class
CatMaybes<A>
final class
Coalesce<L,
R> final class
Constantly<A,
B> A function that takes two arguments and always returns the first argument.final class
Cycle<A>
Given anIterable
, return an infiniteIterable
that repeatedly cycles its elements, in order.final class
Distinct<A>
final class
Downcast<A extends B,
B> Covariantly cast a value of typeB
to a value of subtypeA
.final class
Empty<A>
A predicate that returns true ifas
is empty; false otherwise.final class
Flatten<A>
final class
Force<A>
Deprecated.in favor oftraversing
into anIO
and running itfinal class
Head<A>
final class
Id<A>
The identity function.final class
Init<A>
final class
Inits<A>
final class
Last<A>
final class
Magnetize<A>
final class
Not<A>
Negate a predicate function.final class
Occurrences<A>
final class
Repeat<A>
Given a value, return an infiniteIterable
that repeatedly iterates that value.final class
Reverse<A>
Given anIterable
, return a reversed representation of thatIterable
.final class
final class
Sort<A extends Comparable<A>>
final class
Tail<A>
Returns the tail of anIterable
; the is, anIterable
of all the elements except for the head element.final class
Tails<A>
final class
Uncons<A>
final 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 Fn1Methods in com.jnape.palatable.lambda.functions.builtin.fn1 with parameters of type Fn1 -
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn2
Classes in com.jnape.palatable.lambda.functions.builtin.fn2 that implement Fn1Modifier and TypeClassDescriptionfinal class
$<A,
B> final class
All<A>
Eagerly apply a predicate to each element in anIterable
, returningtrue
if every element satisfies the predicate, andfalse
otherwise.final class
Alter<A>
final class
Any<A>
Eagerly apply a predicate to each element in anIterable
, returningtrue
if any element satisfies the predicate, andfalse
otherwise.final class
AutoBracket<A extends AutoCloseable,
B> Given anIO
yielding someAutoCloseable
typeA
and a kleisli arrow from that type to a newIO
of typeB
, attempt to provision theA
, applying the body operation if provisioning was successful and ensuring thatAutoCloseable.close()
is called regardless of whether the body succeeds or fails.final class
Both<A,
B, C> final 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.final class
CmpEq<A extends 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.final class
Cons<A>
Prepend an element to anIterable
.final class
Difference<A>
final class
Drop<A>
Lazily skip the firstn
elements from anIterable
by returning anIterable
that begins iteration after thenth
element.final 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
.final class
Eq<A>
Type-safe equality in function form; usesObject.equals(java.lang.Object)
, not==
.final class
Filter<A>
Lazily apply a predicate to each element in anIterable
, returning anIterable
of just the elements for which the predicate evaluated totrue
.final 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
.final 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.final class
GT<A extends Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is strictly greater than the first value; otherwise, return false.final class
GTE<A extends 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.final class
InGroupsOf<A>
Lazily group theIterable
by returning anIterable
of smallerIterable
s of sizek
.final class
Intersperse<A>
Lazily inject the provided separator value between each value in the suppliedIterable
.final class
Into<A,
B, C> final class
Into1<A,
B> Given an
and aFn1
<A, B>
, pop the head and apply it to the function, returning the result.SingletonHList
<A>final class
Into3<A,
B, C, D> final class
Into4<A,
B, C, D, E> final class
Into5<A,
B, C, D, E, F> final class
Into6<A,
B, C, D, E, F, G> final class
Into7<A,
B, C, D, E, F, G, H> final class
Into8<A,
B, C, D, E, F, G, H, I> final class
Iterate<A>
final class
LazyRec<A,
B> final class
LT<A extends Comparable<A>>
Given twoComparable
values of typeA
, returntrue
if the second value is strictly less than the first value; otherwise, return false.final class
LTE<A extends 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.final class
MagnetizeBy<A>
final class
Map<A,
B> Lazily apply a function to each element in anIterable
, producing anIterable
of the mapped results.final 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.final class
final 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 itfinal class
PrependAll<A>
Lazily prepend each value with of theIterable
with the supplied separator value.final class
ReduceLeft<A>
final class
ReduceRight<A>
final class
Replicate<A>
Produce anIterable
of a valuen
times.final 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.final class
Slide<A>
final class
Snoc<A>
final class
SortBy<A,
B extends 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.final class
SortWith<A>
Given anIterable
and aComparator
over theIterable
element type, produce a sortedList
of the original elements based on sorting applied by theComparator
.final class
Span<A>
final 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.final 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
.final class
ToArray<A>
Write all the elements of anIterable
directly into an array of the specified type.final class
ToCollection<A,
C extends Collection<A>> Given anFn0
of someCollection
C
, create an instance ofC
and add all of the elements in the providedIterable
to the instance.final class
final class
Tupler2<A,
B> Creates aTuple2
from two values.final class
Unfoldr<A,
B> final 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.final 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 Fn1Modifier and TypeMethodDescriptionstatic <A,
B> Fn1 <A, B> static <A extends AutoCloseable,
B>
Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>> AutoBracket.autoBracket
(IO<A> io) CartesianProduct.cartesianProduct
(Iterable<A> as) Cons.cons
(A a) Difference.difference
(Iterable<A> xs) Drop.drop
(int n) InGroupsOf.inGroupsOf
(Integer k) Intersperse.intersperse
(A a) static <A,
B> Fn1 <SingletonHList<A>, B> Into7.into7
(Fn7<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, ? super G, ? extends H> fn) Into8.into8
(Fn8<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, ? super G, ? super H, ? extends I> fn) MagnetizeBy.magnetizeBy
(Fn2<? super A, ? super A, ? extends Boolean> predicate) Partition.partition
(Fn1<? super A, ? extends CoProduct2<B, C, ?>> function) Deprecated.static <A,
B, FAB extends BoundedBifunctor<A, B, ? super A, ? super B, ?>>
Fn1<FAB, FAB> Deprecated.PrependAll.prependAll
(A a) ReduceLeft.reduceLeft
(Fn2<? super A, ? super A, ? extends A> fn) ReduceRight.reduceRight
(Fn2<? super A, ? super A, ? extends A> fn) 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<Iterable<A>, App>>
Fn1<Fn1<Iterable<A>, ? extends AppIterable>, AppIterable> Sequence.sequence
(Iterable<? extends Applicative<A, App>> iterableApp) static <A,
B, App extends Applicative<?, App>, AppMap extends Applicative<Map<A, B>, App>>
Fn1<Fn1<Map<A, B>, ? extends AppMap>, AppMap> Sequence.sequence
(Map<A, ? extends Applicative<B, App>> mapApp) Snoc.snoc
(A a) static <A,
B extends Comparable<B>>
Fn1<Iterable<A>, List<A>> SortWith.sortWith
(Comparator<? super A> comparator) Take.take
(int n) static <A,
C extends Collection<A>>
Fn1<Iterable<A>, C> ToCollection.toCollection
(Fn0<C> cFn0) Tupler2.tupler
(A a) Methods in com.jnape.palatable.lambda.functions.builtin.fn2 that return types with arguments of type Fn1Modifier and TypeMethodDescriptionstatic <A extends AutoCloseable,
B>
Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>> AutoBracket.autoBracket
(IO<A> io) static <A,
B, FAB extends BoundedBifunctor<A, B, ? super A, ? super B, ?>>
Fn2<Fn1<? super B, ? extends IO<?>>, FAB, FAB> 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<Iterable<A>, App>>
Fn1<Fn1<Iterable<A>, ? extends AppIterable>, AppIterable> Sequence.sequence
(Iterable<? extends Applicative<A, App>> iterableApp) static <A,
B, App extends Applicative<?, App>, AppMap extends Applicative<Map<A, B>, App>>
Fn1<Fn1<Map<A, B>, ? extends AppMap>, AppMap> Sequence.sequence
(Map<A, ? extends Applicative<B, App>> mapApp) Methods in com.jnape.palatable.lambda.functions.builtin.fn2 with parameters of type Fn1Modifier and TypeMethodDescriptionstatic <A,
B> Fn1 <A, B> static <A,
B> B static <A> Boolean
static <A> Boolean
static <A extends AutoCloseable,
B>
IO<B> AutoBracket.autoBracket
(IO<A> io, Fn1<? super A, ? extends IO<B>> bodyIO) static <A,
B, C> Tuple2 <B, C> $.checkedApply
(Fn1<? super A, ? extends B> fn, A a) Alter.checkedApply
(Fn1<? super A, ? extends IO<?>> effect, A a) Into1.checkedApply
(Fn1<? super A, ? extends B> fn, SingletonHList<A> singletonHList) Iterate.checkedApply
(Fn1<? super A, ? extends A> fn, A seed) Partition.checkedApply
(Fn1<? super A, ? extends CoProduct2<B, C, ?>> function, Iterable<A> as) Peek.checkedApply
(Fn1<? super A, ? extends IO<?>> effect, FA fa) Deprecated.Peek2.checkedApply
(Fn1<? super A, ? extends IO<?>> effectA, Fn1<? super B, ? extends IO<?>> effectB, FAB fab) Deprecated.Sequence.checkedApply
(Traversable<? extends Applicative<A, App>, Trav> traversable, Fn1<TravA, ? extends AppTrav> pure) static <A> Iterable
<A> static <A> Iterable
<A> static <A> Maybe
<A> static <A,
B> Fn1 <SingletonHList<A>, B> static <A,
B> B Into1.into1
(Fn1<? super A, ? extends B> fn, SingletonHList<A> singletonHList) static <A> Iterable
<A> static <A,
B> Iterable <B> Partition.partition
(Fn1<? super A, ? extends CoProduct2<B, C, ?>> function) Partition.partition
(Fn1<? super A, ? extends CoProduct2<B, C, ?>> function, Iterable<A> as) Deprecated.static <A,
FA extends Functor<A, ?>>
FADeprecated.static <A,
B, FAB extends BoundedBifunctor<A, B, ? super A, ? super B, ?>>
Fn2<Fn1<? super B, ? extends IO<?>>, FAB, FAB> Deprecated.static <A,
B, FAB extends BoundedBifunctor<A, B, ? super A, ? super B, ?>>
Fn1<FAB, FAB> 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<Iterable<A>, App>>
AppIterableSequence.sequence
(Iterable<? extends Applicative<A, App>> iterableApp, Fn1<Iterable<A>, ? extends AppIterable> pure) static <A,
B, App extends Applicative<?, App>, AppMap extends Applicative<Map<A, B>, App>>
AppMapSequence.sequence
(Map<A, ? extends Applicative<B, App>> mapApp, Fn1<Map<A, B>, ? extends AppMap> pure) static <A,
B extends Comparable<B>>
Fn1<Iterable<A>, List<A>> static <A,
B extends Comparable<B>>
List<A> static <A> Iterable
<A> static <A,
B> Iterable <A> static <A> IO
<A> -
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn3
Classes in com.jnape.palatable.lambda.functions.builtin.fn3 that implement Fn1Modifier and TypeClassDescriptionfinal class
Between<A extends 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.final 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.final class
Clamp<A extends 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 valuefinal class
CmpEqBy<A,
B extends 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.final 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.final 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)
.final 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.final class
FoldRight<A,
B> final class
GTBy<A,
B extends 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.final class
GTEBy<A,
B extends 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.final 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.final 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.final 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.final class
LTBy<A,
B extends 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.final class
LTEBy<A,
B extends 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.final 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.final 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.final 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.final 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.final 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 Fn1Modifier and TypeMethodDescriptionstatic <A extends Comparable<A>>
Fn1<A, A> Clamp.clamp
(A lower, A upper) static <A> Fn1
<A, ComparisonRelation> Compare.compare
(Comparator<A> comparator, A a) 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> Fn1
<A, A> Methods in com.jnape.palatable.lambda.functions.builtin.fn3 that return types with arguments of type Fn1Modifier and TypeMethodDescriptionMethods in com.jnape.palatable.lambda.functions.builtin.fn3 with parameters of type Fn1Modifier and TypeMethodDescriptionstatic <A,
B> IO <B> Bracket.bracket
(IO<A> io, Fn1<? super A, ? extends IO<?>> cleanupIO, Fn1<? super A, ? extends IO<B>> bodyIO) Bracket.checkedApply
(IO<A> io, Fn1<? super A, ? extends IO<?>> cleanupIO, Fn1<? super A, ? extends IO<B>> bodyIO) static <A,
B extends Comparable<B>>
BiPredicate<A, A> static <A,
B extends Comparable<B>>
Predicate<A> static <A,
B extends Comparable<B>>
Booleanstatic <A,
B extends Comparable<B>>
BiPredicate<A, A> static <A,
B extends Comparable<B>>
Predicate<A> static <A,
B extends Comparable<B>>
Booleanstatic <A,
B extends Comparable<B>>
BiPredicate<A, A> static <A,
B extends Comparable<B>>
Predicate<A> static <A,
B extends Comparable<B>>
Booleanstatic <A,
B extends Comparable<B>>
BiPredicate<A, A> static <A,
B extends Comparable<B>>
Predicate<A> static <A,
B extends Comparable<B>>
Booleanstatic <A,
B extends Comparable<B>>
BiPredicate<A, A> static <A,
B extends Comparable<B>>
Predicate<A> static <A,
B extends Comparable<B>>
Booleanstatic <A> Fn1
<A, A> static <A> A
-
Uses of Fn1 in com.jnape.palatable.lambda.functions.builtin.fn4
Classes in com.jnape.palatable.lambda.functions.builtin.fn4 that implement Fn1Modifier and TypeClassDescriptionfinal class
IfThenElse<A,
B> final 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.final class
RateLimit<A>
Methods in com.jnape.palatable.lambda.functions.builtin.fn4 that return Fn1Modifier and TypeMethodDescriptionstatic <A,
B> Fn1 <A, B> IfThenElse.ifThenElse
(Fn1<? super A, ? extends 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) Methods in com.jnape.palatable.lambda.functions.builtin.fn4 that return types with arguments of type Fn1Modifier and TypeMethodDescriptionIfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate) IfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate) IfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate, Fn1<? super A, ? extends B> thenCase) Methods in com.jnape.palatable.lambda.functions.builtin.fn4 with parameters of type Fn1Modifier and TypeMethodDescriptionIfThenElse.checkedApply
(Fn1<? super A, ? extends Boolean> predicate, Fn1<? super A, ? extends B> thenCase, Fn1<? super A, ? extends B> elseCase, A a) IfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate) IfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate, Fn1<? super A, ? extends B> thenCase) static <A,
B> Fn1 <A, B> IfThenElse.ifThenElse
(Fn1<? super A, ? extends Boolean> predicate, Fn1<? super A, ? extends B> thenCase, Fn1<? super A, ? extends B> elseCase) static <A,
B> B IfThenElse.ifThenElse
(Fn1<? super A, ? extends 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 Fn1Modifier and TypeClassDescriptionfinal 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 Fn1Modifier and TypeMethodDescriptionstatic <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 Fn1Modifier and TypeClassDescriptionfinal 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 Fn1Modifier and TypeMethodDescriptionstatic <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 Fn1Modifier and TypeClassDescriptionfinal 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 Fn1Modifier and TypeMethodDescriptionstatic <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 Fn1Modifier and TypeClassDescriptionfinal 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 Fn1Modifier and TypeMethodDescriptionstatic <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 Fn1Modifier and TypeMethodDescription<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 Fn1Modifier and TypeClassDescriptionfinal 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 Fn1Modifier and TypeMethodDescriptionstatic <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 Fn1Modifier and TypeMethodDescription<C,
D> RecursiveResult <C, D> Dually map covariantly over both the left and right parameters.<C> RecursiveResult
<C, B> Covariantly map over the left parameter.<C> RecursiveResult
<A, C> Covariantly map over the right parameter.Trampoline.checkedApply
(Fn1<? super A, ? extends RecursiveResult<A, B>> fn, A a) <C> RecursiveResult
<A, C> Chain dependent computations that may continue or short-circuit based on previous results.<C> RecursiveResult
<A, C> Covariantly transmute this functor's parameter using the given mapping function.<R> R
<R> R
static <A,
B> Fn1 <A, B> Trampoline.trampoline
(Fn1<? super A, ? extends RecursiveResult<A, B>> fn) static <A,
B> B Trampoline.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 Fn1Modifier and TypeMethodDescription<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.specializedModifier and TypeInterfaceDescriptioninterface
BiMonoidFactory<A,
B, C> interface
BiPredicate<A,
B> interface
BiSemigroupFactory<A,
B, C> interface
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 Fn1Modifier and TypeMethodDescriptionContravariantly mapA <- B
.Contravariantly mapA <- B
.default <Z> Predicate
<Z> Contravariantly mapA <- B
.default <Z> BiPredicate
<Z, B> Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.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> Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.Adapt a compatible function into aKleisli
arrow.static <A> Predicate
<A> Static factory method to create a predicate from anFn1
.Method parameters in com.jnape.palatable.lambda.functions.specialized with type arguments of type Fn1Modifier and TypeMethodDescriptiondefault <D> BiPredicate
<A, B> BiPredicate.discardR
(Applicative<D, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Kleisli.discardR
(Applicative<C, Fn1<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.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 Fn1Modifier and TypeMethodDescriptionDually map covariantly over both the left and right parameters.Dually covariantly map both the left and right parameters into values that are covariant toContraA
andContraB
, respectively.Covariantly map over the left parameter.Covariantly map the left parameter into a value that is covariant toContraA
.Covariantly map over the right parameter.Covariantly map the right parameter into a value that is covariant toContraB
.Contravariantly mapA <- B
.default <Z> Cocartesian
<Z, B, P> Contravariantly mapA <- B
.<B> Contravariant
<B, C> Contravariantly mapA <- B
.default <Z> Profunctor
<Z, B, PF> Contravariantly mapA <- B
.Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,
C> Cocartesian <Z, C, P> Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,
C> Profunctor <Z, C, PF> Dually map contravariantly over the left parameter and covariantly over the right parameter.Contravariantly map over the left parameter.default <Z> Cocartesian
<Z, B, P> Contravariantly map over the left parameter.default <Z> Profunctor
<Z, B, PF> Contravariantly map over the left parameter.Covariantly map over the right parameter.default <C> Cocartesian
<A, C, P> Covariantly map over the right parameter.default <C> Profunctor
<A, C, PF> Covariantly map over the right parameter.default <B> Applicative
<B, App> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Method parameters in com.jnape.palatable.lambda.functor with type arguments of type Fn1Modifier and TypeMethodDescriptiondefault <B> Lazy
<? extends Applicative<B, App>> 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 Fn1Modifier and TypeFieldDescriptionExchange.bt
Market.bt
Lazy.Compose.flatMap
Exchange.sa
Market.sta
Writer.writerFn
Methods in com.jnape.palatable.lambda.functor.builtin that return Fn1Modifier and TypeMethodDescriptionExchange.bt()
Extract the mappingB -> T
.Market.bt()
Extract the mappingB -> T
.Exchange.sa()
Extract the mappingS -> A
.Market.sta()
Extract the mappingS ->
.Either
<T, A>Methods in com.jnape.palatable.lambda.functor.builtin with parameters of type Fn1Modifier and TypeMethodDescription<C,
D> Const <C, D> Dually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the right parameter.Update the accumulated state.Update the accumulated state.Contravariantly mapA <- B
.Contravariantly mapA <- B
.Contravariantly mapA <- B
.Dually map contravariantly over the left parameter and covariantly over the right parameter.Dually map contravariantly over the left parameter and covariantly over the right parameter.<Z,
C> Tagged <Z, C> Dually map contravariantly over the left parameter and covariantly over the right parameter.Contravariantly map over the left parameter.Contravariantly map over the left parameter.Contravariantly map over the left parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Chain dependent computations that may continue or short-circuit based on previous results.<B> Identity
<B> Chain dependent computations that may continue or short-circuit based on previous results.<B> Lazy
<B> Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.Map over the right parameter.<B> Identity
<B> Covariantly transmute this functor's parameter using the given mapping function.final <B> Lazy
<B> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.static <S,
A> State <S, A> Create aState
that maps its initial state into its result, but leaves the initial state unchanged.Map the accumulation into a value and pair it with the current output.Map the accumulation into a value and pair it with the current output.Modify thisMonadReader's
environment after reading it but before running the effect.Map both the result and the final state to a new result and final state.static <S,
A> State <S, A> Create aState
fromstateFn
, a function that maps an initial state into a result and a final state.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.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.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.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.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.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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 Fn1ModifierConstructorDescriptionprivate
private
-
Uses of Fn1 in com.jnape.palatable.lambda.internal.iteration
Fields in com.jnape.palatable.lambda.internal.iteration declared as Fn1Modifier and TypeFieldDescriptionTrampoliningIterator.fn
MappingIterator.function
UnfoldingIterator.function
FilteringIterator.predicate
PredicatedTakingIterator.predicate
Fields in com.jnape.palatable.lambda.internal.iteration with type parameters of type Fn1Modifier and TypeFieldDescriptionMappingIterable.mappers
FilteringIterable.predicates
private final ImmutableQueue
<Fn1<? super A, ? extends Boolean>> PredicatedDroppingIterable.predicates
PredicatedDroppingIterator.predicates
PredicatedTakingIterable.predicates
Constructors in com.jnape.palatable.lambda.internal.iteration with parameters of type Fn1ModifierConstructorDescriptionTrampoliningIterator
(Fn1<? super A, ? extends Iterable<RecursiveResult<A, B>>> fn, A a) Constructor parameters in com.jnape.palatable.lambda.internal.iteration with type arguments of type Fn1ModifierConstructorDescriptionPredicatedDroppingIterator
(ImmutableQueue<Fn1<? super A, ? extends Boolean>> predicates, Iterator<A> asIterator) -
Uses of Fn1 in com.jnape.palatable.lambda.io
Fields in com.jnape.palatable.lambda.io with type parameters of type Fn1Methods in com.jnape.palatable.lambda.io with parameters of type Fn1Modifier and TypeMethodDescriptionIO.exceptionally
(Fn1<? super Throwable, ? extends A> recoveryFn) Deprecated.in favor of canonicalIO.catchError(Fn1)
final <B> IO
<B> Chain dependent computations that may continue or short-circuit based on previous results.final <B> IO
<B> 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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.final <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 -
Uses of Fn1 in com.jnape.palatable.lambda.monad
Fields in com.jnape.palatable.lambda.monad declared as Fn1Methods in com.jnape.palatable.lambda.monad that return Fn1Modifier and TypeMethodDescriptionprivate <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 Fn1Modifier and TypeMethodDescription<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> MonadWriter
<W, A, MW> Update the accumulated state.Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadError
<E, B, M> Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadReader
<R, B, MR> Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.<B> MonadWriter
<W, B, MW> Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadError
<E, B, M> Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadReader
<R, B, MR> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.default <B> MonadWriter
<W, B, MW> Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.<B> MonadWriter
<W, Tuple2<A, B>, MW> Map the accumulation into a value and pair it with the current output.MonadReader
<R, A, MR> 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) 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.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 Fn1Modifier and TypeMethodDescriptionGiven 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>> 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>> Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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>> Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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.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.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 Fn1ModifierConstructorDescriptionprivate
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 Fn1Modifier and TypeMethodDescriptionChain dependent computations that may continue or short-circuit based on previous results.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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 Fn1Methods in com.jnape.palatable.lambda.monad.transformer.builtin with parameters of type Fn1Modifier and TypeMethodDescriptionDually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the right parameter.Update the accumulated state.Update the accumulated state.Contravariantly mapA <- B
.Dually map contravariantly over the left parameter and covariantly over the right parameter.Contravariantly map over the left parameter.Covariantly map over the right parameter.If the embedded value is present and satisfiespredicate
then returnjust
the embedded valueChain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.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.Map the accumulation into a value and pair it with the current output.Map the accumulation into a value and pair it with the current output.Modify thisMonadReader's
environment after reading it but before running the effect.Modify thisMonadReader's
environment after reading it but before running the effect.ReaderT.mapReaderT
(Fn1<? super MA, ? extends MonadRec<B, N>> fn) Map both the result and the final state to a new result and final state inside theMonad
.Lift a state-sensitivemonadically embedded
computation intoStateT
.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.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.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.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.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.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.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.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.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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 -
Uses of Fn1 in com.jnape.palatable.lambda.monoid
Subinterfaces of Fn1 in com.jnape.palatable.lambda.monoidMethods in com.jnape.palatable.lambda.monoid with parameters of type Fn1 -
Uses of Fn1 in com.jnape.palatable.lambda.monoid.builtin
Classes in com.jnape.palatable.lambda.monoid.builtin that implement Fn1Modifier and TypeClassDescriptionfinal class
AddAll<A,
C extends Collection<A>> TheMonoid
instance formed under mutative concatenation for an arbitraryCollection
.final class
AMonoid
instance formed byBoolean
.final class
Collapse<_1,
_2> final class
Compose<A>
final class
Concat<A>
final class
Endo<A>
final class
The monoid formed under monadic endomorphism.final class
First<A>
final class
AMonoid
instance formed byString
that concats two strings together.final class
Last<A>
final class
LeftAll<L,
R> final class
LeftAny<L,
R> final 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
.final class
AMonoid
instance formed by mergingHMaps
using the chosenTypeSafeKey
->Semigroup
mappings
, defaulting toLast
in case noSemigroup
has been chosen for a givenTypeSafeKey
.final class
MergeMaps<K,
V> final class
AMonoid
instance formed byBoolean
.final class
Present<A>
final class
final class
RightAll<L,
R> final class
RightAny<L,
R> final class
RunAll<A>
final class
final class
Union<A>
final class
Logical exclusive-or.Methods in com.jnape.palatable.lambda.monoid.builtin that return Fn1Modifier and TypeMethodDescriptionstatic <A,
C extends Collection<A>>
Fn1<C, C> static <A> Fn1
<CompletableFuture<A>, CompletableFuture<A>> Compose.compose
(Monoid<A> aMonoid, CompletableFuture<A> x) static <A> Fn1
<A, A> Endo.identity()
Methods in com.jnape.palatable.lambda.monoid.builtin that return types with arguments of type Fn1Methods in com.jnape.palatable.lambda.monoid.builtin with parameters of type Fn1 -
Uses of Fn1 in com.jnape.palatable.lambda.optics
Methods in com.jnape.palatable.lambda.optics that return Fn1Modifier and TypeMethodDescriptiondefault <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 Fn1Methods in com.jnape.palatable.lambda.optics with parameters of type Fn1Modifier and TypeMethodDescriptionContravariantly mapA <- B
.Contravariantly mapA <- B
.Contravariantly mapA <- B
.Dually map contravariantly over the left parameter and covariantly over the right parameter.Dually map contravariantly over the left parameter and covariantly over the right parameter.Dually map contravariantly over the left parameter and covariantly over the right parameter.Contravariantly map over the left parameter.Contravariantly map over the left parameter.Contravariantly map over the left parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Covariantly map over the right parameter.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.Covariantly transmute this functor's parameter using the given mapping function.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> Static factory method for creating an iso from a function and it's inverse.static <S,
T, A, B>
Lens<S, T, A, B> Static factory method for creating a lens from a getter function and a setter function.Covariantly mapA
toC
, yielding a new optic.Covariantly mapA
toC
, yielding a new optic.Covariantly mapA
toC
, yielding a new optic.Covariantly mapA
toC
, yielding a new optic.default <C> ProtoOptic
<P, S, T, C, B> Covariantly mapA
toC
, yielding a new optic.Contravariantly mapB
toZ
, yielding a new optic.Contravariantly mapB
toZ
, yielding a new optic.Contravariantly mapB
toZ
, yielding a new optic.Contravariantly mapB
toZ
, yielding a new optic.default <Z> ProtoOptic
<P, S, T, A, Z> Contravariantly mapB
toZ
, yielding a new optic.Contravariantly mapS
toR
, yielding a new optic.Contravariantly mapS
toR
, yielding a new optic.Contravariantly mapS
toR
, yielding a new optic.Contravariantly mapS
toR
, yielding a new optic.default <R> ProtoOptic
<P, R, T, A, B> Contravariantly mapS
toR
, yielding a new optic.Covariantly mapT
toU
, yielding a new optic.Covariantly mapT
toU
, yielding a new optic.Covariantly mapT
toU
, yielding a new optic.Covariantly mapT
toU
, yielding a new optic.default <U> ProtoOptic
<P, S, U, A, B> 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> 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> Iso.Simple <S, A> 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.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.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.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 Fn1Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 Fn1Modifier and TypeClassDescriptionfinal class
Matching<S,
T, A, B> final 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.final class
Pre<P extends Profunctor<?,
?, ? extends P>, S, T, A, B> final class
Re<S,
T, A, B> Turn anOptic
with a unary mapping that can be used for setting (e.g.final class
Set<S,
T, A, B> final class
Under<S,
T, A, B> final class
View<S,
T, A, B> Methods in com.jnape.palatable.lambda.optics.functions that return Fn1Modifier and TypeMethodDescriptionstatic <S,
T, A, B>
Fn1<S, T> static <S,
T, A, B>
Fn1<S, T> 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> Methods in com.jnape.palatable.lambda.optics.functions that return types with arguments of type Fn1Modifier and TypeMethodDescriptionMethods in com.jnape.palatable.lambda.optics.functions with parameters of type Fn1Modifier and TypeMethodDescriptionOver.checkedApply
(Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B> optic, Fn1<? super A, ? extends B> fn, S s) 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> 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 Fn1Modifier and TypeMethodDescriptionOver.checkedApply
(Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B> optic, Fn1<? super A, ? extends B> fn, S s) static <S,
T, A, B>
Fn1<S, T> 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> static <S,
T, A, B>
Fn1<S, T> static <S,
T, A, B>
Tstatic <S,
T, A, B>
Fn1<S, A> static <S,
T, A, B>
A -
Uses of Fn1 in com.jnape.palatable.lambda.optics.lenses
Methods in com.jnape.palatable.lambda.optics.lenses with parameters of type Fn1Modifier and TypeMethodDescriptionstatic <X,
CX extends Collection<X>>
Lens.Simple<CX, CX> Convenience static factory method for creating a lens that focuses on a copy of aCollection
, given a function that creates the copy.A lens that focuses on a copy of aMap
as a subtypeM
.static <X,
CX extends Collection<X>>
Lens.Simple<CX, Set<X>> Convenience static factory method for creating a lens that focuses on an arbitraryCollection
as aSet
.static <X,
CX extends Collection<X>>
Lens.Simple<CX, Stream<X>> Convenience static factory method for creating a lens that focuses on a Collection as a Stream.static <A,
SetA extends Set<A>>
Lens.Simple<SetA, Boolean> A lens that focuses on whether aSet
contains some valuea
.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 -
Uses of Fn1 in com.jnape.palatable.lambda.semigroup
Subinterfaces of Fn1 in com.jnape.palatable.lambda.semigroupModifier and TypeInterfaceDescriptioninterface
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 Fn1Modifier and TypeClassDescriptionfinal class
Absent<A>
final class
Collapse<_1,
_2> final class
Compose<A>
final class
Intersection<A>
final class
LeftAll<L,
R> final class
LeftAny<L,
R> final class
Max<A extends Comparable<A>>
ASemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly less thany
, returny
Otherwise, returnx
final class
MaxBy<A,
B extends 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
final 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
final class
Merge<L,
R> final class
Min<A extends Comparable<A>>
ASemigroup
overA
that chooses between two valuesx
andy
via the following rules: Ifx
is strictly greater thany
, returny
Otherwise, returnx
final class
MinBy<A,
B extends 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
final 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
final class
RightAll<L,
R> final class
RightAny<L,
R> final class
RunAll<A>
Methods in com.jnape.palatable.lambda.semigroup.builtin that return Fn1Modifier and TypeMethodDescriptionstatic <A> Fn1
<CompletableFuture<A>, CompletableFuture<A>> Compose.compose
(Semigroup<A> aSemigroup, CompletableFuture<A> x) Intersection.intersection
(Iterable<A> xs) static <A extends Comparable<A>>
Fn1<A, A> Max.max
(A x) static <A,
B extends Comparable<B>>
Fn1<A, A> static <A> Fn1
<A, A> MaxWith.maxWith
(Comparator<A> compareFn, A x) static <A extends Comparable<A>>
Fn1<A, A> Min.min
(A x) static <A,
B extends Comparable<B>>
Fn1<A, A> static <A> Fn1
<A, A> MinWith.minWith
(Comparator<A> compareFn, A x) Methods in com.jnape.palatable.lambda.semigroup.builtin with parameters of type Fn1Modifier and TypeMethodDescriptionMaxBy.checkedApply
(Fn1<? super A, ? extends B> compareFn) MinBy.checkedApply
(Fn1<? super A, ? extends B> compareFn) static <A,
B extends Comparable<B>>
Semigroup<A> static <A,
B extends Comparable<B>>
Fn1<A, A> static <A,
B extends Comparable<B>>
Astatic <A,
B extends Comparable<B>>
Semigroup<A> static <A,
B extends Comparable<B>>
Fn1<A, A> static <A,
B extends Comparable<B>>
A -
Uses of Fn1 in com.jnape.palatable.lambda.traversable
Methods in com.jnape.palatable.lambda.traversable with parameters of type Fn1Modifier and TypeMethodDescription<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> Covariantly transmute this functor's parameter using the given mapping function.default <B> Traversable
<B, T> 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 Fn1Modifier and TypeMethodDescription<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.
matching
into anIO
and explicitly running it