Safe Haskell | Safe-Inferred |
---|
- class Monad m => MonadPlus m where
- msum :: MonadPlus m => [m a] -> m a
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- mremove :: MonadPlus m => (a -> Bool) -> m a -> m a
- mpartition :: MonadPlus m => (a -> Bool) -> m a -> (m a, m a)
- mfromMaybe :: MonadPlus m => Maybe a -> m a
- mcatMaybes :: MonadPlus m => m (Maybe a) -> m a
- mmapMaybe :: MonadPlus m => (a -> Maybe b) -> m a -> m b
Documentation
class Monad m => MonadPlus m where
Monads that also support choice and failure.
mpartition :: MonadPlus m => (a -> Bool) -> m a -> (m a, m a)Source
Generalizes the partition
function.
mfromMaybe :: MonadPlus m => Maybe a -> m aSource
Translate maybe to an arbitrary MonadPlus
type.
Generalizes the maybeToList
function.
mcatMaybes :: MonadPlus m => m (Maybe a) -> m aSource
Pass through Just
occurrences.
Generalizes the catMaybes
function.