Add mfilter to Control.Monad
|Reported by:||JonFairbairn||Owned by:||igloo|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
In the comments of #3453, I contemplated a filter function on MonadPlus. The consensus seems to be that this function is an appropriate addition.
mfilter is just List.filter generalised to any MonadPlus.
It must have been embodied in Monad comprehensions when we had those, so I'm sure it's simply an oversight that it hasn't been included here already.