
1 Apr
2014
1 Apr
'14
12:36 a.m.
On Mon, Mar 31, 2014, at 09:15 PM, martin wrote:
(1) I had tried mapM, but this didn't work. I am having trouble to understand why the return type is m() and not m [a]
mapM_ is like mapM, except that mapM_ ignores the result value. In other words, mapM_ is for when you only want the monadic effects. You could define it like this: mapM_ f xs = mapM f xs >> return () -Karl