arrow-mtl-data / arrow.mtl / EitherT

EitherT

@higherkind data class EitherT<F, A, B>

EitherT<F, A, 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<F, A, 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(AF: Applicative<F>, ff: <ERROR CLASS><F, A, (B) -> C>): EitherT<F, A, C>
cata fun <C> cata(FF: Functor<F>, l: (A) -> C, r: (B) -> C): Kind<F, C>
combineK fun combineK(MF: Monad<F>, y: <ERROR CLASS><F, A, B>): EitherT<F, A, B>
exists fun exists(FF: Functor<F>, p: (B) -> Boolean): Kind<F, Boolean>
flatMap fun <C> flatMap(MF: Monad<F>, f: (B) -> <ERROR CLASS><F, A, C>): EitherT<F, A, C>
flatMapF fun <C> flatMapF(MF: Monad<F>, f: (B) -> Kind<F, Either<A, C>>): EitherT<F, A, 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<F, A, C>
map fun <C> map(FF: Functor<F>, f: (B) -> C): EitherT<F, A, C>
mapLeft fun <C> mapLeft(FF: Functor<F>, f: (A) -> C): EitherT<F, C, B>
semiflatMap fun <C> semiflatMap(MF: Monad<F>, f: (B) -> Kind<F, C>): EitherT<F, A, C>
subflatMap fun <C> subflatMap(FF: Functor<F>, f: (B) -> Either<A, C>): EitherT<F, A, 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<F, C, D>
value fun value(): Kind<F, Either<A, B>>

Companion Object Functions

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

Do you like Arrow?

Arrow Org
<