Add concatMapM to Control.Monad
|Reported by:||twanvl||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
I have written this function over and over again for different projects. Time to add it to the base libraries:
-- | The 'concatMapM' function generalizes 'concatMap' to arbitrary monads. concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = liftM concat (mapM f xs)
Change History (5)
Note: See TracTickets for help on using tickets.