Modifier and Type | Method and Description |
---|---|
<R2,App extends Applicative<?,App>,TravB extends Traversable<R2,Either<L,?>>,AppTrav extends Applicative<TravB,App>> |
Either.traverse(Fn1<? super R,? extends Applicative<R2,App>> fn,
Fn1<? super TravB,? extends AppTrav> pure)
Apply
fn 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. |
Modifier and Type | Method and Description |
---|---|
<L2,R2> Either<L2,R2> |
Either.biMap(Fn1<? super L,? extends L2> leftFn,
Fn1<? super R,? extends R2> rightFn)
Dually map covariantly over both the left and right parameters.
|
<L2> Either<L2,R> |
Either.biMapL(Fn1<? super L,? extends L2> fn)
Covariantly map over the left parameter.
|
<R2> Either<L,R2> |
Either.biMapR(Fn1<? super R,? extends R2> fn)
Covariantly map over the right parameter.
|
Either<L,R> |
Either.catchError(Fn1<? super L,? extends Monad<R,Either<L,?>>> recoveryFn)
|
<R2> Either<L,R2> |
Either.discardL(Applicative<R2,Either<L,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<R2> Either<L,R> |
Either.discardR(Applicative<R2,Either<L,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
Either<L,R> |
Either.filter(Fn1<? super R,? extends Boolean> pred,
Fn0<L> leftFn0)
If this is a right value, apply
pred to it. |
Either<L,R> |
Either.filter(Fn1<? super R,? extends Boolean> pred,
Fn1<? super R,? extends L> leftFn)
If this is a right value, apply
pred to it. |
<R2> Either<L,R2> |
Either.flatMap(Fn1<? super R,? extends Monad<R2,Either<L,?>>> rightFn)
If a right value, unwrap it and apply it to
rightFn , returning the resulting
Either<L ,R> . |
<R2> Either<L,R2> |
Either.fmap(Fn1<? super R,? extends R2> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
static <L,R> Either<L,R> |
Either.fromMaybe(Maybe<R> maybe,
Fn0<L> leftFn0)
Convert a
Maybe <R> into an Either<L, R> , supplying the left value from
leftFn in the case of Maybe.nothing() . |
Either<R,L> |
Either.invert() |
static <L,R> Either<L,R> |
Either.left(L l)
Static factory method for creating a left value.
|
Either<L,R> |
Either.merge(Fn2<? super L,? super L,? extends L> leftFn,
Fn2<? super R,? super R,? extends R> rightFn,
Either<L,R>... others)
Given two binary operators over L and R, merge multiple
Either<L, R> s into a single
Either<L, R> . |
Either<L,R> |
Either.peek(Fn1<? super L,? extends IO<?>> leftEffect,
Fn1<? super R,? extends IO<?>> rightEffect)
|
Either<L,R> |
Either.peek(Fn1<? super R,? extends IO<?>> effect)
|
<R2> Either<L,R2> |
Either.pure(R2 r2)
Lift the value
b into this applicative functor. |
static <L,R> Either<L,R> |
Either.right(R r)
Static factory method for creating a right value.
|
Either<L,R> |
Either.throwError(L l)
Throw an error value of type
E into the monad . |
Either<Throwable,A> |
Try.toEither()
If this is a success, wrap the value in a
right(R) and return it. |
<L> Either<L,A> |
Maybe.toEither(Fn0<L> lFn0)
If this value is absent, return the value supplied by
lSupplier wrapped in Either.left . |
<L> Either<L,A> |
Try.toEither(Fn1<? super Throwable,? extends L> fn)
If this is a success, wrap the value in a
right(R) and return it. |
<B> Either<L,B> |
Either.trampolineM(Fn1<? super R,? extends MonadRec<RecursiveResult<R,B>,Either<L,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
static <R> Either<Throwable,R> |
Either.trying(Fn0<? extends R> fn0)
Attempt to execute the
Fn0 , returning its result in a right value. |
static <L,R> Either<L,R> |
Either.trying(Fn0<? extends R> fn0,
Fn1<? super Throwable,? extends L> leftFn)
Attempt to execute the
Fn0 , returning its result in a right value. |
static Either<Throwable,Unit> |
Either.trying(SideEffect sideEffect)
Attempt to execute the
SideEffect , returning Unit in a right value. |
static <L> Either<L,Unit> |
Either.trying(SideEffect sideEffect,
Fn1<? super Throwable,? extends L> leftFn)
Attempt to execute the
SideEffect , returning Unit in a right value. |
<R2> Either<L,R2> |
Either.zip(Applicative<Fn1<? super R,? extends R2>,Either<L,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
Modifier and Type | Method and Description |
---|---|
<R2> Lazy<Either<L,R2>> |
Either.lazyZip(Lazy<? extends Applicative<Fn1<? super R,? extends R2>,Either<L,?>>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |
static <L> Pure<Either<L,?>> |
Either.pureEither()
|
Modifier and Type | Method and Description |
---|---|
static <A> Maybe<A> |
Maybe.fromEither(Either<?,A> either)
|
Either<L,R> |
Either.merge(Fn2<? super L,? super L,? extends L> leftFn,
Fn2<? super R,? super R,? extends R> rightFn,
Either<L,R>... others)
Given two binary operators over L and R, merge multiple
Either<L, R> s into a single
Either<L, R> . |
Modifier and Type | Method and Description |
---|---|
Either<L,R> |
Either.catchError(Fn1<? super L,? extends Monad<R,Either<L,?>>> recoveryFn)
|
<R2> Either<L,R2> |
Either.discardL(Applicative<R2,Either<L,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<R2> Either<L,R> |
Either.discardR(Applicative<R2,Either<L,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<R2> Either<L,R2> |
Either.flatMap(Fn1<? super R,? extends Monad<R2,Either<L,?>>> rightFn)
If a right value, unwrap it and apply it to
rightFn , returning the resulting
Either<L ,R> . |
<R2> Lazy<Either<L,R2>> |
Either.lazyZip(Lazy<? extends Applicative<Fn1<? super R,? extends R2>,Either<L,?>>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |
<B> Either<L,B> |
Either.trampolineM(Fn1<? super R,? extends MonadRec<RecursiveResult<R,B>,Either<L,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<R2> Either<L,R2> |
Either.zip(Applicative<Fn1<? super R,? extends R2>,Either<L,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
Modifier and Type | Method and Description |
---|---|
Either<Iterable<L>,Iterable<R>> |
Coalesce.checkedApply(Iterable<Either<L,R>> eithers) |
static <A,B> Either<Iterable<A>,Iterable<B>> |
Coalesce.coalesce(Iterable<Either<A,B>> eithers) |
Modifier and Type | Method and Description |
---|---|
Either<Iterable<L>,Iterable<R>> |
Coalesce.checkedApply(Iterable<Either<L,R>> eithers) |
static <A,B> Either<Iterable<A>,Iterable<B>> |
Coalesce.coalesce(Iterable<Either<A,B>> eithers) |
Modifier and Type | Method and Description |
---|---|
Fn1<? super S,? extends Either<T,A>> |
Market.sta()
Extract the mapping
S -> . |
Constructor and Description |
---|
Market(Fn1<? super B,? extends T> bt,
Fn1<? super S,? extends Either<T,A>> sta) |
Modifier and Type | Method and Description |
---|---|
IO<Either<Throwable,A>> |
IO.safe()
|
Modifier and Type | Method and Description |
---|---|
<MELR extends MonadRec<Either<L,R>,M>> |
EitherT.runEitherT()
Recover the full structure of the embedded
Monad . |
Modifier and Type | Method and Description |
---|---|
static <M extends MonadRec<?,M>,L,R> |
EitherT.eitherT(MonadRec<Either<L,R>,M> melr)
|
Modifier and Type | Method and Description |
---|---|
static <L,R> Either<L,R> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
Modifier and Type | Method and Description |
---|---|
Monoid<Either<L,R>> |
LeftAny.checkedApply(Monoid<L> lMonoid) |
Monoid<Either<L,R>> |
LeftAll.checkedApply(Monoid<L> lMonoid) |
Monoid<Either<L,R>> |
RightAny.checkedApply(Monoid<R> rMonoid) |
Monoid<Either<L,R>> |
RightAll.checkedApply(Monoid<R> rMonoid) |
Monoid<Either<L,R>> |
Merge.checkedApply(Semigroup<L> lSemigroup,
Monoid<R> rMonoid) |
static <L,R> Monoid<Either<L,R>> |
LeftAll.leftAll(Monoid<L> lMonoid) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> Monoid<Either<L,R>> |
LeftAny.leftAny(Monoid<L> lMonoid) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> MonoidFactory<Monoid<R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup) |
static <L,R> Monoid<Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Monoid<Either<L,R>> |
RightAll.rightAll(Monoid<R> rMonoid) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Monoid<Either<L,R>> |
RightAny.rightAny(Monoid<R> rMonoid) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x) |
Modifier and Type | Method and Description |
---|---|
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> Either<L,R> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAll.leftAll(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Monoid<L> lMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Either<L,R> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAll.rightAll(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x) |
static <L,R> Either<L,R> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAny.rightAny(Monoid<R> rMonoid,
Either<L,R> x,
Either<L,R> y) |
Modifier and Type | Method and Description |
---|---|
default Tuple2<Fn1<? super B,? extends T>,Fn1<? super S,? extends Either<T,A>>> |
Prism.unPrism()
|
Modifier and Type | Method and Description |
---|---|
Either<T,A> |
Matching.checkedApply(Optic<? super Market<A,B,?,?>,? super Identity<?>,S,T,A,B> optic,
S s) |
static <S,T,A,B> Either<T,A> |
Matching.matching(Optic<? super Market<A,B,?,?>,? super Identity<?>,S,T,A,B> optic,
S s) |
Modifier and Type | Method and Description |
---|---|
static <S,T,A,B> Fn1<S,Either<T,A>> |
Matching.matching(Optic<? super Market<A,B,?,?>,? super Identity<?>,S,T,A,B> optic) |
Modifier and Type | Method and Description |
---|---|
static <L,R> Lens.Simple<Either<L,R>,Maybe<L>> |
EitherLens._left()
Convenience static factory method for creating a lens over left values, wrapping them in a
Maybe . |
static <L,R> Lens.Simple<Either<L,R>,Maybe<R>> |
EitherLens._right()
Convenience static factory method for creating a lens over right values, wrapping them in a
Maybe . |
Modifier and Type | Method and Description |
---|---|
static <L,R> Prism.Simple<Either<L,R>,L> |
EitherPrism._left()
|
static <L,R> Prism.Simple<Either<L,R>,R> |
EitherPrism._right()
|
Modifier and Type | Method and Description |
---|---|
static <L,R> Either<L,R> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
Modifier and Type | Method and Description |
---|---|
Semigroup<Either<L,R>> |
LeftAny.checkedApply(Semigroup<L> lSemigroup) |
Semigroup<Either<L,R>> |
LeftAll.checkedApply(Semigroup<L> lSemigroup) |
Semigroup<Either<L,R>> |
Merge.checkedApply(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup) |
Semigroup<Either<L,R>> |
RightAll.checkedApply(Semigroup<R> rSemigroup) |
Semigroup<Either<L,R>> |
RightAny.checkedApply(Semigroup<R> rSemigroup) |
static <L,R> Semigroup<Either<L,R>> |
LeftAll.leftAll(Semigroup<L> lSemigroup) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> Semigroup<Either<L,R>> |
LeftAny.leftAny(Semigroup<L> lSemigroup) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> SemigroupFactory<Semigroup<R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup) |
static <L,R> Semigroup<Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Semigroup<Either<L,R>> |
RightAll.rightAll(Semigroup<R> rSemigroup) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Semigroup<Either<L,R>> |
RightAny.rightAny(Semigroup<R> rSemigroup) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x) |
Modifier and Type | Method and Description |
---|---|
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> Either<L,R> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAll.leftAll(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
LeftAny.leftAny(Semigroup<L> lSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
Merge.merge(Semigroup<L> lSemigroup,
Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Either<L,R> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAll.rightAll(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Fn1<Either<L,R>,Either<L,R>> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x) |
static <L,R> Either<L,R> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |
static <L,R> Either<L,R> |
RightAny.rightAny(Semigroup<R> rSemigroup,
Either<L,R> x,
Either<L,R> y) |