Created
June 28, 2009 18:21
-
-
Save oranenj/137331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn to-gl-const [k] | |
(let [gl (str "GL_" (.. (name k) | |
(replace \- \_) (toUpperCase)))] | |
`(. ~'GL ~(symbol gl)))) | |
(to-gl-const 'foo) | |
(defmacro many-consts [& consts] | |
`(do ~@(map to-gl-const consts))) | |
(macroexpand-1 '(many-consts foo bar)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment