Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created August 5, 2012 07:05
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 mattdeboard/d85b7f024a431cbbdfdf to your computer and use it in GitHub Desktop.
Save mattdeboard/d85b7f024a431cbbdfdf to your computer and use it in GitHub Desktop.
(defmacro proxy-foo [infile klass & [moremeta]]
(let [metadata (merge {:filename infile} moremeta)
newmeta (gensym "newmeta-")]
`(proxy [~klass clojure.lang.IObj] [~infile]
(withMeta [~newmeta] (proxy-foo ~infile ~klass ~metadata))
(meta [] ~metadata))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment