Created
December 15, 2015 05:32
-
-
Save crowl/5105444996d22d786e01 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sucesioncola | |
(lambda (n) | |
(letrec ([sc-do (lambda (a b c count) | |
(cond | |
((= count 0) c) | |
(else | |
(sc-do (+ a c) a b (- count 1)))))]) | |
(cond | |
((< n 3) n) | |
(else (sc-do 2 1 0 n)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment