I am working my way through the Haskell book and am on chapter 8. While doing the exercises I noticed something I didn't understand.
Why does this result in stack overflow
mc x | x>100 = x-10
| otherwise = mc $ mc x+11
but this doesn't
mc x | x>100 = x-10
| otherwise = mc $ mc (x+11)
I think it has something to do with x+11 not being evaluated in the first example but aren't expressions like that always evaluated
for example
Prelude> id 43+94
137
id (43 + 94) == (id 43) + 94, but that's not true for an arbitrary function.