Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created August 22, 2010 06:32
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 alandipert/543427 to your computer and use it in GitHub Desktop.
Save alandipert/543427 to your computer and use it in GitHub Desktop.
(defmacro create [tag]
`(. (ObjectFactory.) ~(symbol (str "create" (camelize (eval tag))))))
; (create :notice) -> #<Notice org.dipert.hoptoad.jaxb.Notice@303b48c8>
; (let [x :notice] (create x)) -> "Can't eval locals"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment