Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created July 19, 2011 20:14
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 sritchie/1093590 to your computer and use it in GitHub Desktop.
Save sritchie/1093590 to your computer and use it in GitHub Desktop.
(defmacro defjob [name & forms]
(let [prefix (str name "-")
classname (str *ns* name)
sym (with-meta
(symbol (str name "-main"))
(meta name))]
`(do (gen-class :name ~classname
:main ~true
:prefix ~prefix)
(defn ~sym ~@forms))))
(defjob StaticPailer [x] x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment