
9 Nov
2008
9 Nov
'08
2:01 a.m.
On Sun, Nov 9, 2008 at 12:37 AM, Logesh Pillay
I wrote the following program a while ago :-
[snip]
This compiles. When I run it however, it exits with the stack exceeded message.
Why? Are the function composition operators more than syntactic sugar for the brackets?
Your problem is probably in this expression:
sumFacDigits n `div` 10
Becuase function application binds tightest, this is the same as:
div (sumFacDigitss n) 10
whereas your original was:
sumFacDigits (div n 10)
So your transformed program is not the same as your original. I hope that helps. -Antoine