Skip to content

Instantly share code, notes, and snippets.

@raek
Created August 17, 2010 18:03
Show Gist options
  • Select an option

  • Save raek/531174 to your computer and use it in GitHub Desktop.

Select an option

Save raek/531174 to your computer and use it in GitHub Desktop.
(defn my-repeat [n x]
(when-not (zero? n)
(cons x (my-repeat (dec n) x))))
(defn my-repeat [n x]
(lazy-seq
(when-not (zero? n)
(cons x (my-repeat (dec n) x)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment