Proposal: add new function "check" to Control.Monad
Yitzchak Gale
gale at sefer.org
Mon Aug 24 04:03:09 EDT 2009
Jón Fairbairn wrote:
> Trac ticket #3453. Two week time frame.
> Add check function to Control.Monad
> check :: (MonadPlus m) => (a -> Bool) -> a -> m a
I remember needing this on a number of occasions.
> mfilter = (join .) . liftM . check
I might write that as:
mFilter = (=<<) . check
That is an intriguing dual to filterM.
Regards,
Yitz
More information about the Libraries
mailing list