[Haskell-cafe] Java or C to Haskell

Carajillu crespi.albert at gmail.com
Wed Sep 20 05:19:36 EDT 2006


wow, the simpliest ever!


Andrea Rossato wrote:
> 
> 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!
> andrea
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 

-- 
View this message in context: http://www.nabble.com/Java-or-C-to-Haskell-tf2303820.html#a6404305
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list