Skip to content

Instantly share code, notes, and snippets.

@peccu
Created April 28, 2010 16:15
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 peccu/382327 to your computer and use it in GitHub Desktop.
Save peccu/382327 to your computer and use it in GitHub Desktop.
(defun fib(n m)
(let ((n1 n)(n2 m)(n3 (+ n m)))
(while (<= n3 7110)
(when (= n3 7110)
(insert (format "\nfib(%d,%d) = %d" n m n3)))
(setq n1 n2)
(setq n2 n3)
(setq n3 (+ n1 n2)))))
(loop
for i from 1 to 100
do
(loop
for j from 1 to 100
do
(fib i j)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment