JavaScript is disabled on your browser.
Type Parameters:
A - the result type
All Superinterfaces:
Applicative <A,Fn1 <Unit ,?>> , Cartesian <Unit ,A,Fn1 <?,?>> , Cocartesian <Unit ,A,Fn1 <?,?>> , Contravariant <Unit ,Profunctor <?,A,Fn1 <?,?>>> , Fn1 <Unit ,A> , Functor <A,Fn1 <Unit ,?>> , Monad <A,Fn1 <Unit ,?>> , MonadReader <Unit ,A,Fn1 <Unit ,?>> , MonadRec <A,Fn1 <Unit ,?>> , MonadWriter <Unit ,A,Fn1 <Unit ,?>> , Profunctor <Unit ,A,Fn1 <?,?>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function taking "no arguments", implemented as an
Fn1 <Unit , A>.
See Also:
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods
Convenience method for applying this
Fn0 without providing an explicit
Unit.
Invoke this function with the given argument, potentially throwing any
Throwable.
Covariantly map over the return value of this function, producing a function that takes the same argument, and
produces the new result type.
Sequence both this Applicative and appB, discarding this Applicative's
result and returning appB.
Sequence both this Applicative and appB, discarding appB's result and
returning this Applicative.
Chain dependent computations that may continue or short-circuit based on previous results.
Left-to-right composition.
Static factory method for coercing a lambda to an
Fn0.
Static factory method for adapting an
Fn1 <Unit, A> to an
Fn0 <A>.
Convenience method for converting a
Callable to an
Fn0.
Convenience method for converting a
Supplier to an
Fn0.
Lift the value b into this applicative functor.
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen , apply , carry , cartesian , censor , choose , cocartesian , compose , contraMap , diMap , diMapL , lazyZip , listens , local , self , thunk , toFunction , trampolineM , widen
Methods inherited from interface com.jnape.palatable.lambda.functor.Functor
coerce
Method Details
apply
Convenience method for applying this
Fn0 without providing an explicit
Unit.
Returns:
the result
checkedApply
Invoke this function with the given argument, potentially throwing any
Throwable.
Specified by:
checkedApply in interface Fn1 <Unit ,A >
Parameters:
unit - the argument
Returns:
the result of the function application
Throws:
Throwable - anything possibly thrown by the function
flatMap
Description copied from interface: Fn1
Chain dependent computations that may continue or short-circuit based on previous results.
Specified by:
flatMap in interface Fn1 <Unit ,A >
Specified by:
flatMap in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
flatMap in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
flatMap in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
flatMap in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the resulting monad parameter type
Parameters:
f - the dependent computation over A
Returns:
the new monad instance
fmap
default <B> Fn0 <B> fmap (Fn1 <? super A ,? extends B> f)
Description copied from interface: Fn1
Left-to-right composition.
Specified by:
fmap in interface Applicative <A ,Fn1 <Unit ,?>>
Specified by:
fmap in interface Fn1 <Unit ,A >
Specified by:
fmap in interface Functor <A ,Fn1 <Unit ,?>>
Specified by:
fmap in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
fmap in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
fmap in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
fmap in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the return type of the next function to invoke
Parameters:
f - the function to invoke with this function's return value
Returns:
a function representing the composition of this function and f
pure
default <B> Fn0 <B> pure (B b)
Description copied from interface: Fn1
Lift the value b into this applicative functor.
Specified by:
pure in interface Applicative <A ,Fn1 <Unit ,?>>
Specified by:
pure in interface Fn1 <Unit ,A >
Specified by:
pure in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
pure in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
pure in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
pure in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the type of the returned applicative's parameter
Parameters:
b - the value
Returns:
an instance of this applicative over b
zip
Description copied from interface: Fn1
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
Specified by:
zip in interface Applicative <A ,Fn1 <Unit ,?>>
Specified by:
zip in interface Fn1 <Unit ,A >
Specified by:
zip in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
zip in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
zip in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
zip in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the resulting applicative parameter type
Parameters:
appFn - the other applicative instance
Returns:
the mapped applicative
zip
Description copied from interface: Fn1
Specified by:
zip in interface Fn1 <Unit ,A >
discardL
Description copied from interface: Fn1
Sequence both this Applicative and appB, discarding this Applicative's
result and returning appB. This is generally useful for sequentially performing side-effects.
Specified by:
discardL in interface Applicative <A ,Fn1 <Unit ,?>>
Specified by:
discardL in interface Fn1 <Unit ,A >
Specified by:
discardL in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
discardL in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
discardL in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
discardL in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the type of the returned Applicative's parameter
Parameters:
appB - the other Applicative
Returns:
appB
discardR
Description copied from interface: Fn1
Sequence both this Applicative and appB, discarding appB's result and
returning this Applicative. This is generally useful for sequentially performing side-effects.
Specified by:
discardR in interface Applicative <A ,Fn1 <Unit ,?>>
Specified by:
discardR in interface Fn1 <Unit ,A >
Specified by:
discardR in interface Monad <A ,Fn1 <Unit ,?>>
Specified by:
discardR in interface MonadReader <Unit ,A ,Fn1 <Unit ,?>>
Specified by:
discardR in interface MonadRec <A ,Fn1 <Unit ,?>>
Specified by:
discardR in interface MonadWriter <Unit ,A ,Fn1 <Unit ,?>>
Type Parameters:
B - the type of appB's parameter
Parameters:
appB - the other Applicative
Returns:
this Applicative
diMapR
default <B> Fn0 <B> diMapR (Fn1 <? super A ,? extends B> fn)
Description copied from interface: Fn1
Covariantly map over the return value of this function, producing a function that takes the same argument, and
produces the new result type.
Specified by:
diMapR in interface Cartesian <Unit ,A ,Fn1 <?,?>>
Specified by:
diMapR in interface Cocartesian <Unit ,A ,Fn1 <?,?>>
Specified by:
diMapR in interface Fn1 <Unit ,A >
Specified by:
diMapR in interface Profunctor <Unit ,A ,Fn1 <?,?>>
Type Parameters:
B - the new result type
Parameters:
fn - the covariant result mapping function
Returns:
an Fn1 <A, C>
fromSupplier
Convenience method for converting a
Supplier to an
Fn0.
Type Parameters:
A - the output type
Parameters:
supplier - the supplier
Returns:
the Fn0
fromCallable
Convenience method for converting a
Callable to an
Fn0.
Type Parameters:
A - the output type
Parameters:
callable - the callable
Returns:
the Fn0
fn0
static <A> Fn0 <A> fn0 (Fn0 <A> fn)
Static factory method for coercing a lambda to an
Fn0.
Type Parameters:
A - the output type
Parameters:
fn - the lambda to coerce
Returns:
the Fn0
fn0
Static factory method for adapting an
Fn1 <Unit, A> to an
Fn0 <A>.
Type Parameters:
A - the output type
Parameters:
fn - the Fn1
Returns:
the Fn0