Skip to content

Instantly share code, notes, and snippets.

@hiredman
Created January 3, 2014 00:21
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 hiredman/8230036 to your computer and use it in GitHub Desktop.
Save hiredman/8230036 to your computer and use it in GitHub Desktop.
(defmacro parameterized-namespace [types & body]
`(do ~@(for [type types]
`(do
(in-ns '~(symbol (str (ns-name *ns*) "." type)))
(def ~'type ~type)
~@body))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment