Hi,

On Aug 7, 7:12 am, samppi <rbysam...@gmail.com> wrote:

> So is this possible without arcane stuff? 
> Inhttp://groups.google.com/group/clojure/browse_thread/thread/23fe1a5c9...,
> I asked about using a macro to do this, and the consensus seems to be
> that it's possible with magic, but it's generally a bad idea. So what
> should I do—is there anything I can do, other than using only one map
> variable?

And in the above thread I wrote the following:

For this special case however you can solve the issue
as follows:

        (defn with-bundle*
          [the-map thunk]
          (clojure.lang.Var/pushThreadBindings the-map)
          (try
            (thunk)
            (finally
              (clojure.lang.Var/popThreadBindings))))

        (defmacro with-bundle
          [the-map & body]
          `(with-bundle* ~the-map (fn [] ~...@body)))

Hope this helps.

Sincerely
Meikel

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