Uses of Class
com.jnape.palatable.lambda.adt.choice.Choice4
Packages that use Choice4
-
Uses of Choice4 in com.jnape.palatable.lambda.adt.choice
Subclasses of Choice4 in com.jnape.palatable.lambda.adt.choiceModifier and TypeClassDescriptionprivate static final class
Choice4._A<A,
B, C, D> private static final class
Choice4._B<A,
B, C, D> private static final class
Choice4._C<A,
B, C, D> private static final class
Choice4._D<A,
B, C, D> Methods in com.jnape.palatable.lambda.adt.choice with type parameters of type Choice4Modifier and TypeMethodDescription<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.Methods in com.jnape.palatable.lambda.adt.choice that return Choice4Modifier and TypeMethodDescriptionstatic <A,
B, C, D>
Choice4<A, B, C, D> Choice4.a
(A a) Static factory method for wrapping a value of typeA
in aChoice4
.static <A,
B, C, D>
Choice4<A, B, C, D> Choice4.b
(B b) Static factory method for wrapping a value of typeB
in aChoice4
.Covariantly map over the left parameter.Covariantly map over the right parameter.static <A,
B, C, D>
Choice4<A, B, C, D> Choice4.c
(C c) Static factory method for wrapping a value of typeC
in aChoice4
.Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.static <A,
B, C, D>
Choice4<A, B, C, D> Choice4.d
(D d) Static factory method for wrapping a value of typeD
in aChoice4
.Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Choice3.diverge()
Diverge this coproduct by introducing another possible type that it could represent.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.Choice4.pure
(E e) Lift the valueb
into this applicative functor.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 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.adt.choice that return types with arguments of type Choice4Modifier and TypeMethodDescriptionGiven alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Choice4.pureChoice()
Method parameters in com.jnape.palatable.lambda.adt.choice with type arguments of type Choice4Modifier and TypeMethodDescriptionSequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.Chain dependent computations that may continue or short-circuit based on previous results.Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.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 another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.