Skip to content

Instantly share code, notes, and snippets.

@fffej
Created August 6, 2009 21:43
Show Gist options
  • Save fffej/163582 to your computer and use it in GitHub Desktop.
Save fffej/163582 to your computer and use it in GitHub Desktop.
;; The original definition
(rec-cat s [2 1] (map + s (next s)))
;; Expanding out
(let [s# (atom nil)]
(reset! s# (lazy-seq
(let [s @s#]
(lazy-cat
[2 1]
(map + s (next s)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment