[Haskell-cafe] filter using foldr point-free?

damodar kulkarni kdamodar2000 at gmail.com
Tue Nov 10 06:47:54 EST 2009


Hi,
We can define filter using foldr as under:

filter1 p = foldr (\x xs -> (if (p x) then (x:xs) else xs))  []

Can we define filter using foldr but in pointfree style?

Thanks
-DM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091110/c3370878/attachment.html


More information about the Haskell-Cafe mailing list