[Haskell-cafe] Rewriting filter with foldr
prstanley at ntlworld.com
Sun Sep 30 09:52:22 EDT 2007
The question is asking for a new definition of filter using foldr.
Sorry, I should have mentioned that before.
At 14:26 30/09/2007, you wrote:
>Perhaps a list comprehension better shows the intention of the
>filter p xs = [x | x <- xs, p x]
>You can literally read that as "take all x from xs that satisfy p".
More information about the Haskell-Cafe