Uses of Class
com.jnape.palatable.lambda.adt.choice.Choice2
-
-
Uses of Choice2 in com.jnape.palatable.lambda.adt
Methods in com.jnape.palatable.lambda.adt that return Choice2 Modifier and Type Method Description Choice2<A,Unit>
Maybe. invert()
Swap the type parameters. -
Uses of Choice2 in com.jnape.palatable.lambda.adt.choice
Subclasses of Choice2 in com.jnape.palatable.lambda.adt.choice Modifier and Type Class Description private static class
Choice2._A<A,B>
private static class
Choice2._B<A,B>
Methods in com.jnape.palatable.lambda.adt.choice with type parameters of type Choice2 Modifier and Type Method Description <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.Methods in com.jnape.palatable.lambda.adt.choice that return Choice2 Modifier and Type Method Description static <A,B>
Choice2<A,B>Choice2. a(A a)
Static factory method for wrapping a value of typeA
in aChoice2
.static <A,B>
Choice2<A,B>Choice2. b(B b)
Static factory method for wrapping a value of typeB
in aChoice2
.<C,D>
Choice2<C,D>Choice2. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<C> Choice2<C,B>
Choice2. biMapL(Fn1<? super A,? extends C> fn)
Covariantly map over the left parameter.<C> Choice2<A,C>
Choice2. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.Choice2<A,B>
Choice3. converge(Fn1<? super C,? extends CoProduct2<A,B,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier possible type.<C> Choice2<A,C>
Choice2. discardL(Applicative<C,Choice2<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.<C> Choice2<A,B>
Choice2. discardR(Applicative<C,Choice2<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.<C> Choice2<A,C>
Choice2. flatMap(Fn1<? super B,? extends Monad<C,Choice2<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.<C> Choice2<A,C>
Choice2. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.Choice2<B,A>
Choice2. invert()
Swap the type parameters.<C> Choice2<A,C>
Choice2. pure(C c)
Lift the valueb
into this applicative functor.<C> Choice2<A,C>
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.<C> Choice2<A,C>
Choice2. zip(Applicative<Fn1<? super B,? extends C>,Choice2<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.Methods in com.jnape.palatable.lambda.adt.choice that return types with arguments of type Choice2 Modifier and Type Method Description <C> Lazy<Choice2<A,C>>
Choice2. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Choice2<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.static <A> Pure<Choice2<A,?>>
Choice2. pureChoice()
Method parameters in com.jnape.palatable.lambda.adt.choice with type arguments of type Choice2 Modifier and Type Method Description <C> Choice2<A,C>
Choice2. discardL(Applicative<C,Choice2<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.<C> Choice2<A,B>
Choice2. discardR(Applicative<C,Choice2<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.<C> Choice2<A,C>
Choice2. flatMap(Fn1<? super B,? extends Monad<C,Choice2<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.<C> Lazy<Choice2<A,C>>
Choice2. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,Choice2<A,?>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<C> Choice2<A,C>
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.<C> Choice2<A,C>
Choice2. zip(Applicative<Fn1<? super B,? extends C>,Choice2<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 Choice2 in com.jnape.palatable.lambda.functions
Methods in com.jnape.palatable.lambda.functions that return types with arguments of type Choice2 Modifier and Type Method Description default Fn1<A,Choice2<A,B>>
Fn1. choose()
Choose between a successful resultb
or returning back the input,a
.default <C> Fn1<Choice2<C,A>,Choice2<C,B>>
Fn1. cocartesian()
Choose between either applying this function or returning back a different result altogether.default <C> Fn1<Choice2<C,A>,Choice2<C,B>>
Fn1. cocartesian()
Choose between either applying this function or returning back a different result altogether. -
Uses of Choice2 in com.jnape.palatable.lambda.functor
Methods in com.jnape.palatable.lambda.functor that return types with arguments of type Choice2 Modifier and Type Method Description default Cocartesian<A,Choice2<A,B>,P>
Cocartesian. choose()
Choose between the covariantly-positioned carrier type and the contravariantly-positioned carrier type.<C> Cocartesian<Choice2<C,A>,Choice2<C,B>,P>
Cocartesian. cocartesian()
Choose some typeC
or this profunctor's carrier types.<C> Cocartesian<Choice2<C,A>,Choice2<C,B>,P>
Cocartesian. cocartesian()
Choose some typeC
or this profunctor's carrier types. -
Uses of Choice2 in com.jnape.palatable.lambda.functor.builtin
Methods in com.jnape.palatable.lambda.functor.builtin that return types with arguments of type Choice2 Modifier and Type Method Description <C> Market<A,B,Choice2<C,S>,Choice2<C,T>>
Market. cocartesian()
Choose some typeC
or this profunctor's carrier types.<C> Market<A,B,Choice2<C,S>,Choice2<C,T>>
Market. cocartesian()
Choose some typeC
or this profunctor's carrier types.<C> Tagged<Choice2<C,S>,Choice2<C,B>>
Tagged. cocartesian()
Choose some typeC
or this profunctor's carrier types.<C> Tagged<Choice2<C,S>,Choice2<C,B>>
Tagged. cocartesian()
Choose some typeC
or this profunctor's carrier types. -
Uses of Choice2 in com.jnape.palatable.lambda.io
Fields in com.jnape.palatable.lambda.io declared as Choice2 Modifier and Type Field Description private Choice2<IO<?>,Fn1<java.lang.Object,IO<?>>>
IO.Compose. composition
Constructors in com.jnape.palatable.lambda.io with parameters of type Choice2 Constructor Description Compose(IO<?> source, Choice2<IO<?>,Fn1<java.lang.Object,IO<?>>> composition)
-
Uses of Choice2 in com.jnape.palatable.lambda.monad.transformer.builtin
Fields in com.jnape.palatable.lambda.monad.transformer.builtin with type parameters of type Choice2 Modifier and Type Field Description private ImmutableQueue<Choice2<Fn0<MonadRec<Maybe<Tuple2<A,IterateT<M,A>>>,M>>,MonadRec<A,M>>>
IterateT. spine
Constructor parameters in com.jnape.palatable.lambda.monad.transformer.builtin with type arguments of type Choice2 Constructor Description IterateT(Pure<M> pureM, ImmutableQueue<Choice2<Fn0<MonadRec<Maybe<Tuple2<A,IterateT<M,A>>>,M>>,MonadRec<A,M>>> spine)
-