Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- replicateM :: MonadUnliftIO m => Int -> m a -> m [a]
- sequenceM :: MonadUnliftIO m => [m a] -> m [a]
- unfoldrM :: MonadUnliftIO m => (b -> m (Maybe (a, b))) -> b -> m [a]
- traverseM :: MonadUnliftIO m => (a -> m b) -> [a] -> m [b]
- forM :: MonadUnliftIO m => [a] -> (a -> m b) -> m [b]
- forceM :: (Monad m, NFData a) => m a -> m a

# Documentation

replicateM :: MonadUnliftIO m => Int -> m a -> m [a] Source #

sequenceM :: MonadUnliftIO m => [m a] -> m [a] Source #

unfoldrM :: MonadUnliftIO m => (b -> m (Maybe (a, b))) -> b -> m [a] Source #

Generates a lazy list of values that are produced by a given monadic function.

This function is intended to be like the "standard" `unfoldrM`

except
that the list is generated lazily.

traverseM :: MonadUnliftIO m => (a -> m b) -> [a] -> m [b] Source #

Traverses the function over the list and produces a lazy list in a monadic context.

It is intended to be like the "standard" `traverse`

except
that the list is generated lazily.

forM :: MonadUnliftIO m => [a] -> (a -> m b) -> m [b] Source #