Monad Plus¶
smonad.types.monadplus - The MonadPlus Class.
-
class
smonad.types.monadplus.MonadPlus(value)[source]¶ Bases:
smonad.types.monad.MonadThe MonadPlus Class.
Monads that also support choice and failure.
-
zero= NotImplemented¶ The identity of
plus.This property should be a singleton, the following must be
True:MP.zero is MP.zero
It should satisfy the following law, left zero (notice the bind operator is haskell’s
>>=here):zero >>= f = zero
-