
Hello,
I don't really think that we need this function, it is plenty easy to
just write with "guard". Furthermore, if you choose to add it, then
please do not use "check" for the name. This is way too generic a
name which I often use for local functions that do some validation.
-Iavor
On Mon, Aug 24, 2009 at 1:03 AM, Yitzchak Gale
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 _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries