Uses of Class
com.jnape.palatable.lambda.adt.These
-
Packages that use These Package Description com.jnape.palatable.lambda.adt -
-
Uses of These in com.jnape.palatable.lambda.adt
Subclasses of These in com.jnape.palatable.lambda.adt Modifier and Type Class Description private static class
These._A<A,B>
private static class
These._B<A,B>
private static class
These.Both<A,B>
Methods in com.jnape.palatable.lambda.adt with type parameters of type These Modifier and Type Method Description <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 These Modifier and Type Method Description static <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
.<C,D>
These<C,D>These. biMap(Fn1<? super A,? extends C> lFn, Fn1<? super B,? extends D> rFn)
Dually map covariantly over both the left and right parameters.<Z> These<Z,B>
These. biMapL(Fn1<? super A,? extends Z> fn)
Covariantly map over the left parameter.<C> These<A,C>
These. biMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.static <A,B>
These<A,B>These. both(A a, B b)
<C> These<A,C>
These. discardL(Applicative<C,These<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.<C> These<A,B>
These. discardR(Applicative<C,These<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.<C> These<A,C>
These. flatMap(Fn1<? super B,? extends Monad<C,These<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.<C> These<A,C>
These. fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.<C> These<A,C>
These. pure(C c)
Lift the valueb
into this applicative functor.<C> These<A,C>
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.<C> These<A,C>
These. zip(Applicative<Fn1<? super B,? extends C>,These<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 that return types with arguments of type These Modifier and Type Method Description static <A,B>
Maybe<These<A,B>>These. fromMaybes(Maybe<A> maybeA, Maybe<B> maybeB)
<C> Lazy<These<A,C>>
These. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,These<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<These<A,?>>
These. pureThese()
Method parameters in com.jnape.palatable.lambda.adt with type arguments of type These Modifier and Type Method Description <C> These<A,C>
These. discardL(Applicative<C,These<A,?>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.<C> These<A,B>
These. discardR(Applicative<C,These<A,?>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.<C> These<A,C>
These. flatMap(Fn1<? super B,? extends Monad<C,These<A,?>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.<C> Lazy<These<A,C>>
These. lazyZip(Lazy<? extends Applicative<Fn1<? super B,? extends C>,These<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> These<A,C>
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.<C> These<A,C>
These. zip(Applicative<Fn1<? super B,? extends C>,These<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.
-