You need to use both eval and a macro to get then environment. I think &env contains the lexical environment in any macro call now. (I don't know in each form though). So you need to walk the term, looking for free variables, close under free variables by creating a function and then call eval.
That's probably quite some work to write. Altogether, it looks like at least a step too far. (Especially some kind of problem may arise: what of (+ x y ((fn [z] z) 3))?) But I know sometimes it is necessary to go a few steps further than we should. What is the use case? Best, Nicolas. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en