What is the best way to perform a map inside IO? I defined the
following function, but this must be common enough to warrant something
in the standard library. What am I missing?
-Tom
mapIO :: (a -> IO b) -> [a] -> IO [b]
mapIO _ [] = return []
mapIO f (x:xs) = do y <- f x
ys <- mapIO f xs
return (y : ys)