
10 Feb
2005
10 Feb
'05
1:03 p.m.
On Thu, Feb 10, 2005 at 05:56:09PM +0000, Malcolm Wallace wrote:
Here's another common function I use all the time, which appears to be missing from Data.List:
elemBy :: (a -> a -> Bool) -> a -> [a] -> Bool elemBy eq _ [] = False elemBy eq x (y:ys) = x `eq` y || elemBy eq x ys
How about any (x `eq`) ys ? Best regards Tomasz -- Szukamy programisty C++ i Haskell'a: http://tinyurl.com/5mw4e