Skip to content

Instantly share code, notes, and snippets.

@amalloy
Forked from egamble/macroexpand-n.clj
Created December 9, 2011 05:46
Show Gist options
  • Save amalloy/1450357 to your computer and use it in GitHub Desktop.
Save amalloy/1450357 to your computer and use it in GitHub Desktop.
Recursively macroexpand to depth n
(defn macroexpand-n [n form]
(if (zero? n)
form
(recur (dec n)
(macroexpand-1 form))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment