title: Does every Haskell function do tail calls?
body: <p>I wondered that every function in Haskell should be tail recursive.</p>
  
  <p>The factorial function implemented as a non tail recursive function:</p>
  
  <pre><code>fact 0 = 1
  fact n = n * fact (n - 1)
  </code></pre>
  
  <p>Every operator is a function too, so this is equivalent to</p>
  
  <pre><code>fact 0 = 1
  fact n = (*) n (fact (n - 1))
  </code></pre>
  
  <p>But this is clearly a tail call to me. I wonder why this code causes stack overflows if every call just creates a new thunk on the heap. Shouldn't i get a heap overflow?</p>