Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Recursive Fibonacci in Scheme, a snippet from SICP
(define (fib n)
(cond ((= n 0) 0)
((= n 1) 1)
(else (+ (fib (- n 1))
(fib (- n 2))))))
@enigmaticape

This comment has been minimized.

Copy link
Owner Author

enigmaticape commented Nov 16, 2012

From a discussion of the solution to SICP exercise 1.11 at http://www.enigmaticape.com/blog/sicp-exercise-1-11-iterative-function-fn/

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.