Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created July 28, 2009 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjack/4317ccd3662750ec3876 to your computer and use it in GitHub Desktop.
Save tomjack/4317ccd3662750ec3876 to your computer and use it in GitHub Desktop.
(defn bits
([]
(concat [1 0] (bits [1 0])))
([prev-bits]
(let [next-bits (butlast prev-bits)]
(lazy-cat next-bits (bits (concat prev-bits next-bits))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment