[GHC] #2042: Add concatMapM to Control.Monad
GHC
trac at galois.com
Mon Jan 14 11:36:19 EST 2008
#2042: Add concatMapM to Control.Monad
-------------------------+--------------------------------------------------
Reporter: twanvl | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries/base
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
-------------------------+--------------------------------------------------
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)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2042>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list