On Wed, Jun 13, 2012 at 4:29 PM, Rob Harrop <[email protected]> wrote: > I'm having problems getting read-string and macros to play nicely, a problem > which can be distilled as below:
Try this: user=> (defmacro xr [f] (list 'fn [] (read-string f))) #'user/xr user=> (apply (xr "(println \"hello\")") []) hello nil user=> (macroexpand '(xr "(println \"hello\")")) (fn* ([] (println "hello"))) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- 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
