Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clojure nested macro sample
(defmacro component
([name tag]
`(component ~name ~tag nil))
([name tag docs]
(if docs
`(defmacro ~(with-meta name {:tag tag}) ~docs
[object# k# & options#]
`(u/call! ~object# ~k# ~@options#))
`(defmacro ~(with-meta name {:tag tag})
[object# k# & options#]
`(u/call! ~object# ~k# ~@options#)))))
(component sphere
com.badlogic.gdx.math.collision.Sphere
"Calls a single method on a `sphere`.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.