arrow-mtl / arrow.mtl.extensions / KleisliMonad

KleisliMonad

@extension interface KleisliMonad<F, D> : Monad<KleisliPartialOf<F, D>>, KleisliApplicative<F, D>

Functions

AF open fun AF(): Applicative<F>
ap open fun <A, B> KleisliOf<F, D, A>.ap(ff: KleisliOf<F, D, (A) -> B>): Kleisli<F, D, B>
flatMap open fun <A, B> KleisliOf<F, D, A>.flatMap(f: (A) -> KleisliOf<F, D, B>): Kleisli<F, D, B>
lazyAp open fun <A, B> Kind<KleisliPartialOf<F, D>, A>.lazyAp(ff: () -> Kind<KleisliPartialOf<F, D>, (A) -> B>): Kind<KleisliPartialOf<F, D>, B>
map open fun <A, B> KleisliOf<F, D, A>.map(f: (A) -> B): Kleisli<F, D, B>
MF abstract fun MF(): Monad<F>
tailRecM open fun <A, B> tailRecM(a: A, f: (A) -> KleisliOf<F, D, Either<A, B>>): Kleisli<F, D, B>

Inheritors

KleisliMonadError interface KleisliMonadError<F, D, E> : MonadError<KleisliPartialOf<F, D>, E>, KleisliApplicativeError<F, D, E>, KleisliMonad<F, D>
KleisliMonadReader interface KleisliMonadReader<F, D> : MonadReader<KleisliPartialOf<F, D>, D>, KleisliMonad<F, D>

Do you like Arrow?

Arrow Org
<