Adding an ignore function to Control.Monad
Martijn van Steenbergen
martijn at van.steenbergen.nl
Thu Jul 2 06:42:33 EDT 2009
David Menendez wrote:
> On Wed, Jul 1, 2009 at 4:45 PM, Gwern Branwen<gwern0 at gmail.com> wrote:
>> Alright, I see that there haven't been any real complaints about
>> adding Control.Monad.ignore since I first posted on 10 June. (Although
>> there was a lot of related-but-off-topic discussion.)
> I'll complain. I'm still not convinced that we need a name for (>> return ()).
I think adding ignore is a good idea.
I have several examples where I call a function expecting an M () but
the last statement in my argument do-block has type M A. For that alone
already I think ignore is valuable idiom.
More information about the Libraries