Skip to content

Add mfilter to Control.Monad

In the comments of #3453 (closed), 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.

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information