Created
May 8, 2015 03:47
-
-
Save prayagupa/1aca670ac7520a9d8b83 to your computer and use it in GitHub Desktop.
LISP, ELISP
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
| ;;http://isites.harvard.edu/fs/docs/icb.topic623349.files/emacs_lisp.pdf | |
| (defun fib-rec (n) | |
| "finds the nth Fibonacci number using recursion" | |
| (if (<= n 1) | |
| 1 | |
| (+ (fib-rec (- n 1)) (fib-rec (- n 2))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment