[Haskell-beginners] Type signature question

Chaddaï Fouché chaddai.fouche at gmail.com
Tue Jul 23 19:48:14 CEST 2013


Le 23 juil. 2013 17:23, "Louis-Guillaume Gagnon" <
louis.guillaume.gagnon at gmail.com> a écrit :
>
> > Also, notice that you could just have written
> > isPalindrome xs = xs == reverse xs
>
> Why didn't I think of that

Probably because your internal definition of palindromes is slightly wrong
: note that your function doesn't do the same thing as this one, more
precisely it refuse any palindrome of odd length like [1, 2, 3, 2, 1]. Of
course you may have your own definition that makes even length a
requirement.

-- 
Jedaï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130723/8e40a548/attachment.htm>


More information about the Beginners mailing list