Skip to content

Instantly share code, notes, and snippets.

@paraseba
Created July 29, 2013 16:46
Show Gist options
  • Save paraseba/6105728 to your computer and use it in GitHub Desktop.
Save paraseba/6105728 to your computer and use it in GitHub Desktop.
(defn f1 [n]
(lazy-seq
(cons n (f1 (inc n)))))
(nth (f1 0) 5000)
;; => 5000
(defn f2 [n]
(lazy-seq
(cons n (map identity (f2 (inc n))))))
(nth (f2 0) 5000)
;; => StackOverflowError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment