[Haskell] Types of when and unless in Control.Monad

Henning Thielemann lemming at henning-thielemann.de
Mon Jun 4 21:27:30 CEST 2012


On Mon, 4 Jun 2012, Henning Thielemann wrote:

> On Mon, 4 Jun 2012, Andreas Abel wrote:
>
>> Concerning the suggestion that when_ would be in sync with forM_ and whenM_ 
>> I'd say: not really.  forM_ and whenM_ discard the result of the monadic 
>> computation, while when and when_ do not even have such a result.  They 
>> always just perform some monadic effect and return nothing.
>
> What is whenM_ ? Do you mean mapM_ ?

Ah, I think whenM_ was this one

   whenM_ :: m Bool -> m a -> m ()



More information about the Libraries mailing list