bracaman wrote:

> If you can use elem :: Eq a => a -> [a] -> Bool  function, you can do:
>
> f x l= or (map (elem x) l
>
> On Thursday 07 February 2002 20:17, you wrote:
> > hi,how do I define a function to test whether a number
> > is an element of a list of lists of numbers.
> >
> > elem :: Int -> [[Int]] -> Bool

I prefer

f x l = x `elem` concat l

- Zhanyong Wan

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to