André Thieme <splendidl...@googlemail.com> writes:

> Please try this minimal example in your REPL:
> (defn f [x] (fn [] x)) ; the closure factory
> (def foo (f 0)) ; a useful instance
> (defmacro bar [] `(let [a# ~foo]))
> and then call (bar)

I'm new to Clojure and don't have much experience with Lisps in general,
but trying to do this seems weird to me.  My understanding is that
macros are, well, macros -- code which is expanded at compile-time to
other code.  In which case the interface the macro facility provides
isn't a set of compiler hooks, but just the ability to factor and
abstract the same code you could write without the macro facility.  What
ultimate code-expansion are you trying to achieve?  Perhaps there's a
different way to do it which works within the confines of pure code
re-writing.

-Marshall

-- 
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

Reply via email to