
10 Mar
2008
10 Mar
'08
6:19 p.m.
On Mon, Mar 10, 2008 at 10:11:33PM +0000, Paulo J. Matos wrote:
mapM :: (Monad m) => (a -> m b) -> [a] -> m [b]
So I guess that it makes sense that you get IO [()] instead of IO (), and adding an exception just to say that [()] == () isn't good. By the way, as a consequence can you possibly get IO (()) or IO ([()]) and are these all different from each other?
Note that there exists mapM_ which discards the return values. mapM_ :: (Monad m) => (a -> m b) -> [a] -> m () -- Lars Viklund | zao@acc.umu.se