Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(h)n = 2^(h-1) SICP Exercise 1.10
;; Recursively defined analogue of (h n) = (A 2 n)
(define (h-rec n)
(cond ((= n 0) 0)
((= n 1) 2)
(else (expt 2 (h-rec (- n 1))))))
@enigmaticape

This comment has been minimized.

Copy link
Owner Author

enigmaticape commented Nov 16, 2012

From discussion of solution to Exercise 1.10 of Structure and Interpretation of Computer Programs (SICP), particularly variously restrained Ackermann functions. 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.