arrow-mtl-data / arrow.mtl / EitherT

EitherT

@higherkind data class EitherT<A, F, B> : EitherTOf<A, F, B>, EitherTKindedJ<A, F, B>

EitherT<A, F, B> is a light wrapper on an F<Either<A, B>> with some convenient methods for working with this nested structure.

It may also be said that EitherT is a monad transformer for Either.

Constructors

<init> EitherT<A, F, B> is a light wrapper on an F<Either<A, B>> with some convenient methods for working with this nested structure.EitherT(value: Kind<F, Either<A, B>>)

Functions

ap fun <C> ap(MF: Monad<F>, ff: EitherTOf<A, F, (B) -> C>): EitherT<A, F, C>
cata fun <C> cata(FF: Functor<F>, l: (A) -> C, r: (B) -> C): Kind<F, C>
combineK fun combineK(MF: Monad<F>, y: EitherTOf<A, F, B>): EitherT<A, F, B>
exists fun exists(FF: Functor<F>, p: (B) -> Boolean): Kind<F, Boolean>
flatMap fun <C> flatMap(MF: Monad<F>, f: (B) -> EitherTOf<A, F, C>): EitherT<A, F, C>
flatMapF fun <C> flatMapF(MF: Monad<F>, f: (B) -> Kind<F, Either<A, C>>): EitherT<A, F, C>
fold fun <C> fold(FF: Functor<F>, l: (A) -> C, r: (B) -> C): Kind<F, C>
liftF fun <C> liftF(FF: Functor<F>, fa: Kind<F, C>): EitherT<A, F, C>
map fun <C> map(FF: Functor<F>, f: (B) -> C): EitherT<A, F, C>
mapLeft fun <C> mapLeft(FF: Functor<F>, f: (A) -> C): EitherT<C, F, B>
semiflatMap fun <C> semiflatMap(MF: Monad<F>, f: (B) -> Kind<F, C>): EitherT<A, F, C>
subflatMap fun <C> subflatMap(FF: Functor<F>, f: (B) -> Either<A, C>): EitherT<A, F, C>
toOptionT fun toOptionT(FF: Functor<F>): OptionT<F, B>
transform fun <C, D> transform(FF: Functor<F>, f: (Either<A, B>) -> Either<C, D>): EitherT<C, F, D>
value fun value(): Kind<F, Either<A, B>>

Companion Object Functions

fromEither fun <A, F, B> fromEither(AP: Applicative<F>, value: Either<A, B>): EitherT<A, F, B>
invoke operator fun <A, F, B> invoke(value: Kind<F, Either<A, B>>): EitherT<A, F, B>
just fun <A, F, B> just(MF: Applicative<F>, b: B): EitherT<A, F, B>
left fun <A, F, B> left(MF: Applicative<F>, a: A): EitherT<A, F, B>
liftF fun <A, F, B> liftF(FF: Functor<F>, fa: Kind<F, B>): EitherT<A, F, B>
right fun <A, F, B> right(MF: Applicative<F>, b: B): EitherT<A, F, B>
tailRecM fun <L, F, A, B> tailRecM(MF: Monad<F>, a: A, f: (A) -> EitherTOf<L, F, Either<A, B>>): EitherT<L, F, B>

Do you like Arrow?

Arrow Org
<