Proposal: add ifM and whenM to Control.Monad

Vincent Hanquez tab at snarc.org
Tue Apr 22 13:13:39 UTC 2014


On 2014-04-20 20:10, Mario Pastorelli wrote:
> I would like to propose the addition of two new combinators to 
> Control.Monad:
>
> ifM :: (Monad m) => m Bool -> m a -> m a -> m a
> whenM :: (Monad m) => m Bool -> m () -> m ()
>
Here's my vote,

+1 for whenM and unlessM.

not a big fan of ifM otherwise, but i'll remain neutral about it.

-- 
Vincent


More information about the Libraries mailing list