Created
September 29, 2010 07:27
-
-
Save amalloy/602404 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
user> (defn make-getter [name type] | |
(list 'def name type)) | |
#'user/make-getter | |
user> (defmacro make-gets [names types] | |
`(do | |
~@(map make-getter names types))) | |
#'user/make-gets | |
user> (macroexpand '(make-gets [a] ['str])) | |
(do (def a (quote str))) | |
user> (make-gets [a] ['str]) | |
#'user/a | |
user> a | |
str | |
user> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment