Last active
May 27, 2017 14:09
-
-
Save deque-blog/4fd178785624c38ce50f579c1b7aaa73 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-lazy-seq | |
[^long n] | |
(letfn [(fibs [a b] (cons a (lazy-seq (fibs b (+ a b)))))] | |
(nth (fibs 0N 1N) n))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment