I wondered that every function in Haskell should be tail recursive.
The factorial function implemented as a non tail recursive function:
fact 0 = 1
fact n = n * fact (n - 1)
Every operator is a function too, so this is equivalent to
fact 0 = 1
fact n = (*) n (fact (n - 1))
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?