Monad Plus¶
monad.types.monadplus - The MonadPlus Class.
-
class
monad.types.monadplus.MonadPlus(value)[source]¶ Bases:
monad.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
-