
3 Apr
2010
3 Apr
'10
9:39 a.m.
aditya siram wrote:
Heinrich Apfelmus wrote:
It's similar to how fix works:
http://en.wikibooks.org/wiki/Haskell/Fix_and_recursion
Here various definitions of the factorial as example:
Thank you. This was incredibly helpful. -deech
Anytime. :) There's also a humorous but enlightening list of increasingly complex implementations of the factorial function: The Evolution of a Haskell Programmer. http://www.willamette.edu/~fruehr/haskell/evolution.html The version with fix corresponds to the "Boy Scout Haskell programmer". Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com