
Jon Fairbairn
Trac ticket #3453. Two week time frame.
Add check function to Control.Monad
check :: (MonadPlus m) => (a -> Bool) -> a -> m a check p a | p a = return a | otherwise = mzero
My impression is that the consensus is not to add this, mostly because of the "names for small functions" argument with which I heartily concur, though I suspect that I prejudiced things by not giving a strong enough justification to begin with (eg that what I'd really like to see is check -- by whatever name -- and to deprecate guard as something that encourages imperative thinking) So I've formally proposed mfilter instead. I imagine that I should close this ticket: is the correct resolution "wontfix"? -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk