Add voidM to Control.Monad

Henning Thielemann schlepptop at henning-thielemann.de
Mon Jan 16 15:45:38 CET 2012


Jurriën Stutterheim schrieb:
> Hi all,
> 
> 
> I would like to propose adding the following function to Control.Monad to complement the `void` function:
> 
> voidM :: Monad m => m a -> m ()
> voidM m = m >> return ()

In the case of the IO monad, the already existing 'void' function would
work, too, since IO is also in Functor class.





More information about the Libraries mailing list