Skip to content

Instantly share code, notes, and snippets.

@tkosaka
Created March 19, 2010 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkosaka/337343 to your computer and use it in GitHub Desktop.
Save tkosaka/337343 to your computer and use it in GitHub Desktop.
(defun fib (n)
(let ((x-pre 0))
(loop repeat n
for x = 0 then y
for y = 1 then (+ x-pre y)
do
(setq x-pre x)
finally return y)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment