stack-1.4.0: The Haskell Tool Stack

Safe Haskell | Safe
Language | Haskell2010

Data.Maybe.Extra

Description

Extra Maybe utilities.

Synopsis

- mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]
- forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b]
- mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
- forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b]

# Documentation

mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b] #

Applicative `mapMaybe`.

forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b] #

    forMaybeA == flip mapMaybeA

mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b] #

Monadic `mapMaybe`.

forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b] #

    forMaybeM == flip mapMaybeM