The Ackermann function in Haskell

Whille the Ackermann function is trivial to implement, I had an epiphany with it today.

Instead of a pure mathematical definition, in my mind I had it directly mapped to Haskell code. And no Haskell book I’ve started reading has been developing on this obvious transformation.

I’d rather have these Haskell books first point out the mathematical function definition, and afterwards the code, like it was today for the Ackermann function:
Ackermann function definition

Off course the error notification was not necessary, but otherwise it would have been buggy; get it?

No? Well, I am more tired than usual today so my jokes may be sub par.

Filed under Code

blog comments powered by Disqus