darcs patch: Improve Control.Monad.filterM:
sjanssen at cse.unl.edu
Tue Aug 8 11:58:19 EDT 2006
On Aug 8, 2006, at 10:24 AM, Simon Marlow wrote:
> It may well be better, but it doesn't have the same laziness
> properties, so it isn't the same function. eg. try this:
> do filterM (\x -> return undefined) ; return ()
Ah yes, I missed that.
> Of course we may discuss whether the extra laziness is useful, but
> I can't apply the patch as it stands because it would break Haskell
Data.List uses "#ifdef USE_REPORT_PRELUDE" in places to choose
between original and improved implementations. Is that an option in
> > But the foldr is not needed:
> The foldr was there to allow fusion, I believe.
More information about the Libraries