Skip to content

Instantly share code, notes, and snippets.

@vishesh
Created May 2, 2013 08:27
Show Gist options
  • Select an option

  • Save vishesh/5500923 to your computer and use it in GitHub Desktop.

Select an option

Save vishesh/5500923 to your computer and use it in GitHub Desktop.
Generate a lazy sequence of fibonacci numbers
(defn fibs []
"Generate a lazy sequence of fibonacci numbers"
(lazy-cat '(0 1)
(map + (fibs ) (rest (fibs )))))
(println (take 20 (fibs )))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment