Skip to content

Instantly share code, notes, and snippets.

Created Oct 15, 2010

What would you like to do?
(def person-fields [{:name 'name :type String}])
(defmacro do-stuff [class-name]
`(do ~@(->> (deref (find-var (symbol "cara.webtl.db.upgrade" (str class-name "-fields"))))
(map :name)
(map (fn [printed-value]
`(println ~printed-value))))))
(def person-fields [{:name 'name :type String}])
cara.webtl.db.upgrade> (macroexpand-1 '(do-stuff person))
(do (clojure.core/println name)) ;; ohwell name is not quoted !
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.