[Haskell-cafe] Java or C to Haskell

Andrea Rossato mailing_list at istitutocolli.org
Wed Sep 20 05:16:29 EDT 2006

On Wed, Sep 20, 2006 at 01:31:22AM -0700, Carajillu wrote:
> compare function just compares the two lists and return true if they are
> equal, or false if they are not.
> it is really a simple function, but I've been thinking about it a lot of
> time and I can't get the goal. 

I forgot, obviously, that lists are an instance of the Eq class...
so, this is enough:
comp l1 l2 = if l1 == l2 then True else False

You never stop learning!

More information about the Haskell-Cafe mailing list