
1 Apr
2016
1 Apr
'16
3:46 a.m.
Erik de Castro Lopo
writes:
As pointed out to me on IRC (thanks pjdeport), chaning the type signature of `forM_` to forM_' :: (Monad m, Foldable t) => t a -> (a -> m ()) -> m () would have resulted in an error.
What about mapM_, replicateM_, etc.? In each case, '_' means "if you return a value from your action, it is ignored", and not "you must return unit". -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2