Last active
May 27, 2017 14:08
-
-
Save deque-blog/ad8c6e8b7e212d8ed7e22d6776eb1a9b to your computer and use it in GitHub Desktop.
This file contains 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
(defn fibo-local-vars | |
[^long n] | |
(with-local-vars [curr 0N | |
next 1N | |
iter n] | |
(while (> @iter 0) | |
(let [nnext (+ @curr @next)] | |
(var-set curr @next) | |
(var-set next nnext) | |
(var-set iter (dec @iter)))) | |
@curr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment