Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ackermann's function, as given in SICP.
(define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1)
(A x (- y 1))))))
@enigmaticape

This comment has been minimized.

Copy link
Owner Author

enigmaticape commented Nov 16, 2012

Ackermann's function, from discussion of solution to Exercise 1.10 of Structure and Interpretation Of Computer Programs, from the Enigmatic Ape blog at http://www.enigmaticape.com/blog/sicp-exercise-1-10-ackermanns-antics/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.