Package | Description |
---|---|
com.jnape.palatable.lambda.adt |
Modifier and Type | Method and Description |
---|---|
<C,App extends Applicative<?,App>,TravC extends Traversable<C,These<A,?>>,AppTrav extends Applicative<TravC,App>> |
These.traverse(Fn1<? super B,? extends Applicative<C,App>> fn,
Fn1<? super TravC,? extends AppTrav> pure)
Apply
fn 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. |
Modifier and Type | Method and Description |
---|---|
static <A,B> These<A,B> |
These.a(A a)
Static factory method for wrapping a value of type
A in a These . |
static <A,B> These<A,B> |
These.b(B b)
Static factory method for wrapping a value of type
B in a These . |
<C,D> These<C,D> |
These.biMap(Fn1<? super A,? extends C> lFn,
Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.
|
<Z> These<Z,B> |
These.biMapL(Fn1<? super A,? extends Z> fn)
Covariantly map over the left parameter.
|
<C> These<A,C> |
These.biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.
|
static <A,B> These<A,B> |
These.both(A a,
B b)
|
<C> These<A,C> |
These.discardL(Applicative<C,These<A,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<C> These<A,B> |
These.discardR(Applicative<C,These<A,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<C> These<A,C> |
These.flatMap(Fn1<? super B,? extends Monad<C,These<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.
|
<C> These<A,C> |
These.fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
<C> These<A,C> |
These.pure(C c)
Lift the value
b into this applicative functor. |
<C> These<A,C> |
These.trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,These<A,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<C> These<A,C> |
These.zip(Applicative<Fn1<? super B,? extends C>,These<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
Modifier and Type | Method and Description |
---|---|
<C> Lazy<These<A,C>> |
These.lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,These<A,?>>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |
static <A> Pure<These<A,?>> |
These.pureThese()
|
Modifier and Type | Method and Description |
---|---|
<C> These<A,C> |
These.discardL(Applicative<C,These<A,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<C> These<A,B> |
These.discardR(Applicative<C,These<A,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<C> These<A,C> |
These.flatMap(Fn1<? super B,? extends Monad<C,These<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.
|
<C> Lazy<These<A,C>> |
These.lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,These<A,?>>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |
<C> These<A,C> |
These.trampolineM(Fn1<? super B,? extends MonadRec<RecursiveResult<B,C>,These<A,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<C> These<A,C> |
These.zip(Applicative<Fn1<? super B,? extends C>,These<A,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|