Skip to content

Instantly share code, notes, and snippets.

Created April 25, 2011 15:28
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 anonymous/940669 to your computer and use it in GitHub Desktop.
Save anonymous/940669 to your computer and use it in GitHub Desktop.
better implementation of defn+
(defmacro defn+
[& params]
`(do
(defn ~@params)
(def ~(first params)
(with-meta
~(first params)
{:source ~(pr-str `(defn ~@params))}))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment