Control.Monad proposal: Add whenJust
sol at typeful.net
Sat May 11 19:22:22 CEST 2013
On Sat, May 11, 2013 at 06:15:53PM +0100, Ben Millwood wrote:
> On Sat, May 11, 2013 at 01:10:10AM +0200, Henning Thielemann wrote:
> >I have suggested such rules to Neil Mitchell but he hesitated to
> >recommend functions from Data.Foldable module.
> Maybe what we really need to do is work out why Data.Foldable is so
> maligned, and sort out the import conflicts so it's easier to use.
Yes, sorting out the import conflicts would be awesome.
> I think with the lists-of-length-at-most-1 metaphor, using for_ with
> Maybe is perfectly logical (if you like, imagine an implicit
> maybeToList in there).
More information about the Libraries