clojure is a lisp, so it has a "real" eval, that works on datastructures, not strings
eg. (eval '(+ 1 2)) ; => 3 (eval (list (symbol "+") 1 2)) ; => 3 whenever you write someting like (def x 3), it gets turned into a list with the symbol 'def, the symbol 'x and the number 3, which then is passed to eval. but regarding your question: you should replace all those cases where you concatenate strings with syntax-quote: (def import-list '(java.util.HashMap java.util.Map)) `(import ~...@import-list) ; => (clojure.core/import java.util.HashMap java.util.Map) those backticks create "templates" for code/datastructures, where you can insert stuff, for specifics http://clojure.org/reader which (the part about syntax-quote) you can eval these lists then Alex -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
