
14 Dec
2009
14 Dec
'09
11:43 a.m.
## Control.Monad.void m a -> m () (or void :: f a -> f ())
By the latter, I take it you mean void :: Functor f => f a -> f () void = fmap (const ()) thereby avoiding any premature restriction to Monad. I would be in favour of the generalisation (and of the name 'void').
## Control.Monad.discard :: f a -> f ()
I vote against 'discard', mainly because I already use it frequently, as an infix operator discard :: Applicative f => f a -> f b -> f a It can be jolly useful to intersperse with the `apply` operator e.g. list item = empty `orElse` fmap (:) `apply` item `discard` satisfy ":" `apply` list Regards, Malcolm