Skip to content

Instantly share code, notes, and snippets.

@gautamr
Created July 18, 2017 16:53
Show Gist options
  • Save gautamr/80889fa2f4ecf45cce7d08ad32c0c923 to your computer and use it in GitHub Desktop.
Save gautamr/80889fa2f4ecf45cce7d08ad32c0c923 to your computer and use it in GitHub Desktop.
Lazy Fibonacci series in Clojure
(defn fibo [] (map first (iterate (fn [[a b]] [b (+ a b)]) [0N 1N])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment