Created
November 4, 2012 19:19
-
-
Save enigmaticape/4013173 to your computer and use it in GitHub Desktop.
Recursive function f(n), for completeness, from SICP exercise 1.11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (F n) | |
(cond ( (< n 3) n) | |
( else (+ (F (- n 1)) | |
(* (F (- n 2)) 2) | |
(* (F (- n 3)) 3))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From discussion of solution to exercise 1.11 of Structure and Interpretation of Computer Programs (SICP) on the Enigmatic Ape blog at http://www.enigmaticape.com/blog/sicp-exercise-1-10-ackermanns-antics/