arrow-core-data / arrow.typeclasses / MonadError

MonadError

interface MonadError<F, E> : ApplicativeError<F, E>, Monad<F>

Functions

ensure open fun <A> Kind<F, A>.ensure(error: () -> E, predicate: (A) -> Boolean): Kind<F, A>
redeemWith open fun <A, B> Kind<F, A>.redeemWith(fe: (E) -> Kind<F, B>, fb: (A) -> Kind<F, B>): Kind<F, B>
rethrow open fun <A> Kind<F, Either<E, A>>.rethrow(): Kind<F, A>

Inheritors

MonadThrow interface MonadThrow<F> : MonadError<F, Throwable>

Type Class Hierarchy

Do you like Arrow?

Arrow Org
<