Signature of Control.Monad when and unless
Oren Ben-Kiki
haskell-oren at ben-kiki.org
Fri Aug 24 11:12:55 CEST 2012
I understand why the normal signature is:
when :: Monad m => Bool -> m () -> m ()
unless :: Monad m => Bool -> m () -> m ()
But why isn't there also:
when_ :: Monad m => Bool -> m a -> m ()
unless_ :: Monad m => Bool -> m a -> m ()
That is, I agree that results shouldn't be discarded "by default", but it
should be easy to get rid of them if they are unneeded.
Thanks,
Oren Ben-Kiki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20120824/97a6721f/attachment.htm>
More information about the Libraries
mailing list