arrow-core-data / arrow.typeclasses / MonadPlus


interface MonadPlus<F> : Monad<F>, Alternative<F>

MonadPlus is a typeclass that extends a Monad by supporting choice and failure. It is equal to Alternative in its api, but provides additional laws for how flatMap and empty interact.


plusM Associative operation to combine two structures. MonadPlus variant of fun <A> Kind<F, A>.plusM(other: Kind<F, A>): Kind<F, A>
zeroM Identity for mPlus. MonadPlus variant of emptyopen fun <A> zeroM(): Kind<F, A>


MonadLogic MonadLogic is a typeclass that extends a MonadPlus. It provides functions to control when computations should be performed.interface MonadLogic<F> : MonadPlus<F>

Do you like Arrow?

Arrow Org