Skip to content

Instantly share code, notes, and snippets.

@ijp
Created December 21, 2014 10:25
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 ijp/397d82c0cc819c56b31a to your computer and use it in GitHub Desktop.
Save ijp/397d82c0cc819c56b31a to your computer and use it in GitHub Desktop.
(setq fib (lambda ()
(let* ((b (cdddr fib))
(s (apply '+ b)))
(setcdr (cddr fib) (list (cadr b) s))
(throw 'result s))
0 1))
(defun fib () (catch 'result (funcall fib)))
(fib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment