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

Strake strake888 at gmail.com
Sun Apr 22 03:28:27 CEST 2012


On 21/04/2012, Andreas Abel <andreas.abel at ifi.lmu.de> wrote:
> to avoid silly "return ()" statements like in
>
>    when cond $ do
>      monadicComputationWhoseResultIWantToDiscard
>      return ()

(when cond ∘ void) monadicComputationWhoseResultIWantToDiscard
or
when cond $ () <$ monadicComputationWhoseResultIWantToDiscard



More information about the Haskell mailing list