Skip to content

Instantly share code, notes, and snippets.

@ErikBjare

ErikBjare/fib.lisp

Created Sep 28, 2013
Embed
What would you like to do?
My first lisp function, calculates the fibonacci sequence.
(defun fib (l n)
(if (< (length l) n)
(fib (append l (list (apply #'+ (last l 2)))) n)
l
))
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.