Hi again,
or more like this:
(defn exchange!
[a b & {:keys [f] {f (fn [_ v] v)}}]
(let [av @a bv @b]
(alter a f bv)
(alter b f av)))
(defn exchange-color!
[a b]
(exchange! a b :f #(assoc %1 :color (:color %2))))
(exchange-color! a b)
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en