Hello everyone,

I'm having trouble writing the following tricky macro. I think I might
need some feature that Clojure doesn't have, but I'm not sure.

Description: (bind-later bindings & body)  and (do-binding & body)
(bind-later) is used like a let-form, except that it doesn't
*immediately* make the bindings available.
The bindings become available only within (do-binding).
(do-binding) is always used within a (bind-later).

Here's some sample code showing how it works.

(def a "outer a")
(bind-later (a "inner a")
  (println a)    <-- this prints out "outer a" still.
  (do-binding
    (println a)))  <-- this will print out "inner a"

Is such a macro possible?

Thanks a lot for your help
  -Patrick

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