title: When to use typeclasses?
body: <p>Usually when I create functions I don't know in which functions it is better to use typeclasses (<code>Eq</code>,<code>Integral</code> and etc.) because sometimes there is no need to use them like: </p>
  
  <pre><code>factorial :: Int -&gt; Int 
  bla bla bla 
  bla bla bla
  </code></pre>
  
  <p>and</p>
  
  <pre><code>factorial :: (Integral a) =&gt; a -&gt; a
  bla bla bla
  bla bla bla
  </code></pre>
  
  <p>I believe that the second one is just taking time and place 
  but in elem function it is important to write <code>Eq</code> (below <code>elleme</code> is <code>elem</code>) </p>
  
  <pre><code>elemme :: Eq a =&gt; a -&gt; [a] -&gt; Bool
  y `elemme` [] = False
  y `elemme` (x:xs) = if y == x then True else y `elemme` xs 
  </code></pre>
  
  <p>Please advise me something about it. Thanks.</p>