<div dir="ltr">On Tue, Jul 23, 2013 at 10:33 AM, Louis-Guillaume Gagnon <span dir="ltr">&lt;<a href="mailto:louis.guillaume.gagnon@gmail.com" target="_blank">louis.guillaume.gagnon@gmail.com</a>&gt;</span> wrote:<div class="gmail_extra">

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
isPalindrome xs<br>
     | odd (length xs)              = False<br>
     | firstHalf == secondHalf =True<br>
     | otherwise                       = False<br>
     where half              = div (length xs) 2<br>
                firstHalf       = take half xs<br>
                secondHalf = reverse (drop half xs)<br>
<br>
I would expect the type signature to be:<br>
isPalindrome :: [a] -&gt; Bool<br>
<br>
but ghci gives me<br>
is Eq a =&gt; [a] -&gt; Bool<br>
<br>
and I don&#39;t undestand why the &quot;Eq a =&gt;&quot; shows up<br></blockquote><div><br></div><div>&quot;Eq a&quot; is the &quot;Type class&quot; of &quot;a&quot;. It means that &quot;a&quot; is a type that supports the checking of equality.</div>

<div><br></div><div>Other type classes include: &quot;Show&quot; (types that are printable), and &quot;Ord&quot; (types that are orderable).</div><div><br></div><div>Cheers,</div><div><br></div><div>MCL</div></div></div>
</div>