One way to do it would be to look at the prelude's elem function. Otherwise, just scan each list until you find a match.
> -----Original Message----- > From: Phil Haymen [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 12:18 PM > To: [EMAIL PROTECTED] > Subject: (no subject) > > > 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 > > __________________________________________________ > Do You Yahoo!? > Send FREE Valentine eCards with Yahoo! Greetings! > http://greetings.yahoo.com > _______________________________________________ > Haskell mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/haskell > _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell