Uses of Class
com.jnape.palatable.lambda.adt.These
Packages that use These
-
Uses of These in com.jnape.palatable.lambda.adt
Subclasses of These in com.jnape.palatable.lambda.adtModifier and TypeClassDescriptionprivate static final classThese._A<A,B> private static final classThese._B<A,B> private static final classThese.Both<A,B> Methods in com.jnape.palatable.lambda.adt with type parameters of type TheseModifier and TypeMethodDescription<C,App extends Applicative<?, App>, TravC extends Traversable<C, These<A, ?>>, AppTrav extends Applicative<TravC, App>>
AppTravThese.traverse(Fn1<? super B, ? extends Applicative<C, App>> fn, Fn1<? super TravC, ? extends AppTrav> pure) Applyfnto 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 that return TheseModifier and TypeMethodDescriptionstatic <A,B> These <A, B> These.a(A a) Static factory method for wrapping a value of typeAin aThese.static <A,B> These <A, B> These.b(B b) Static factory method for wrapping a value of typeBin aThese.final <C,D> These <C, D> Dually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the right parameter.static <A,B> These <A, B> These.both(A a, B b) These.discardL(Applicative<C, These<A, ?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.These.discardR(Applicative<C, These<A, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.These.pure(C c) Lift the valuebinto this applicative functor.These.trampolineM(Fn1<? super B, ? extends MonadRec<RecursiveResult<B, C>, These<A, ?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.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 that return types with arguments of type TheseModifier and TypeMethodDescriptionThese.fromMaybes(Maybe<A> maybeA, Maybe<B> maybeB) Given alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.These.pureThese()Method parameters in com.jnape.palatable.lambda.adt with type arguments of type TheseModifier and TypeMethodDescriptionThese.discardL(Applicative<C, These<A, ?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.These.discardR(Applicative<C, These<A, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.Chain dependent computations that may continue or short-circuit based on previous results.Given alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.These.trampolineM(Fn1<? super B, ? extends MonadRec<RecursiveResult<B, C>, These<A, ?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.