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 class
These._A<A,
B> private static final class
These._B<A,
B> private static final class
These.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) 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 that return TheseModifier and TypeMethodDescriptionstatic <A,
B> These <A, B> These.a
(A a) Static factory method for wrapping a value of typeA
in aThese
.static <A,
B> These <A, B> These.b
(B b) Static factory method for wrapping a value of typeB
in 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 thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.These.discardR
(Applicative<C, These<A, ?>> appB) Sequence both thisApplicative
andappB
, discardingappB's
result 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 valueb
into this applicative functor.These.trampolineM
(Fn1<? super B, ? extends MonadRec<RecursiveResult<B, C>, These<A, ?>>> 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 that return types with arguments of type TheseModifier and TypeMethodDescriptionThese.fromMaybes
(Maybe<A> maybeA, Maybe<B> maybeB) Given alazy
instance 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 thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.These.discardR
(Applicative<C, These<A, ?>> appB) 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.These.trampolineM
(Fn1<? super B, ? extends MonadRec<RecursiveResult<B, C>, These<A, ?>>> 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.