Hi, I want to change state of two refs, exchanging between them. Currently 
this is what I do:


(dosync 
        (let [a (first @v)
              b (second @v)]
          (alter a assoc :color (:color @b))
          (alter b assoc :color (:color @a))))

I wonder if there's a better approach, maybe one single function does this.

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