Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- withOptional :: (Foldable t, Alternative t) => (a -> (b -> m c) -> m c) -> t a -> (t b -> m c) -> m c
- optional' :: (MonadPlus t, Alternative f) => f a -> f (t a)
- module Control.Applicative
Documentation
withOptional :: (Foldable t, Alternative t) => (a -> (b -> m c) -> m c) -> t a -> (t b -> m c) -> m c Source #
optional' :: (MonadPlus t, Alternative f) => f a -> f (t a) Source #
A generalized version of optional
that works with Option
for example
module Control.Applicative