Package | Description |
---|---|
com.jnape.palatable.lambda.adt | |
com.jnape.palatable.lambda.adt.choice |
Modifier and Type | Method and Description |
---|---|
<B> Choice3<Unit,A,B> |
Maybe.diverge()
Diverge this coproduct by introducing another possible type that it could represent.
|
<C> Choice3<L,R,C> |
Either.diverge()
Diverge this coproduct by introducing another possible type that it could represent.
|
Modifier and Type | Method and Description |
---|---|
<D,App extends Applicative<?,App>,TravB extends Traversable<D,Choice3<A,B,?>>,AppTrav extends Applicative<TravB,App>> |
Choice3.traverse(Fn1<? super C,? extends Applicative<D,App>> fn,
Fn1<? super TravB,? 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,C> Choice3<A,B,C> |
Choice3.a(A a)
Static factory method for wrapping a value of type
A in a Choice3 . |
static <A,B,C> Choice3<A,B,C> |
Choice3.b(B b)
Static factory method for wrapping a value of type
A in a Choice3 . |
<D,E> Choice3<A,D,E> |
Choice3.biMap(Fn1<? super B,? extends D> lFn,
Fn1<? super C,? extends E> rFn)
Dually map covariantly over both the left and right parameters.
|
<D> Choice3<A,D,C> |
Choice3.biMapL(Fn1<? super B,? extends D> fn)
Covariantly map over the left parameter.
|
<D> Choice3<A,B,D> |
Choice3.biMapR(Fn1<? super C,? extends D> fn)
Covariantly map over the right parameter.
|
static <A,B,C> Choice3<A,B,C> |
Choice3.c(C c)
Static factory method for wrapping a value of type
A in a Choice3 . |
Choice3<A,B,C> |
Choice4.converge(Fn1<? super D,? extends CoProduct3<A,B,C,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier
possible type.
|
<D> Choice3<A,B,D> |
Choice3.discardL(Applicative<D,Choice3<A,B,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<D> Choice3<A,B,C> |
Choice3.discardR(Applicative<D,Choice3<A,B,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<C> Choice3<A,B,C> |
Choice2.diverge()
Diverge this coproduct by introducing another possible type that it could represent.
|
<D> Choice3<A,B,D> |
Choice3.flatMap(Fn1<? super C,? extends Monad<D,Choice3<A,B,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.
|
<D> Choice3<A,B,D> |
Choice3.fmap(Fn1<? super C,? extends D> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
<D> Choice3<A,B,D> |
Choice3.pure(D d)
Lift the value
b into this applicative functor. |
<D> Choice3<A,B,D> |
Choice3.trampolineM(Fn1<? super C,? extends MonadRec<RecursiveResult<C,D>,Choice3<A,B,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<D> Choice3<A,B,D> |
Choice3.zip(Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
Modifier and Type | Method and Description |
---|---|
<D> Lazy<Choice3<A,B,D>> |
Choice3.lazyZip(Lazy<? extends Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>>> 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,B> Pure<Choice3<A,B,?>> |
Choice3.pureChoice()
|
Modifier and Type | Method and Description |
---|---|
<D> Choice3<A,B,D> |
Choice3.discardL(Applicative<D,Choice3<A,B,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<D> Choice3<A,B,C> |
Choice3.discardR(Applicative<D,Choice3<A,B,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<D> Choice3<A,B,D> |
Choice3.flatMap(Fn1<? super C,? extends Monad<D,Choice3<A,B,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.
|
<D> Lazy<Choice3<A,B,D>> |
Choice3.lazyZip(Lazy<? extends Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>>> 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. |
<D> Choice3<A,B,D> |
Choice3.trampolineM(Fn1<? super C,? extends MonadRec<RecursiveResult<C,D>,Choice3<A,B,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<D> Choice3<A,B,D> |
Choice3.zip(Applicative<Fn1<? super C,? extends D>,Choice3<A,B,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|