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

22 Apr
2012
22 Apr
'12
7:19 a.m.
moving to libraries, again ... On Sun, 22 Apr 2012, Julian Gilbey wrote:
On Sat, Apr 21, 2012 at 08:28:27PM -0500, Strake wrote:
On 21/04/2012, Andreas Abel
wrote: to avoid silly "return ()" statements like in
when cond $ do monadicComputationWhoseResultIWantToDiscard return ()
(when cond ∘ void) monadicComputationWhoseResultIWantToDiscard or when cond $ () <$ monadicComputationWhoseResultIWantToDiscard
How is that simpler than
when cond monadicComputationWhoseResultIWantToDiscard
which it would be with the suggested new type?
The original poster wanted to make it simpler, others want to let it be safer.
4776
Age (days ago)
4776
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henning Thielemann