I have a question about cells. I'm not sure how to explain my problem
so maybe the easiest way is to show some code.

Let's say I have this piece of code:

(def my-atom (atom {... big map with many entries ...}))
.
(add-watch my-atom :update update-fn)
.
(swap! my-atom (some-fn ...))

When my-atom changes I want the update-fn to know what has been
changed so that it won't have to compare the old my-atom with new
my-atom to see the changes. This is beacuse my-atom contains a lot
of data and I don't want to search for the change. Is there anyway I
can do this?

According to the API doc, add-watch must have 4 args: a key, a
reference,
its old-state and its new state. What I'm missing here is an addtional
arg that can be passed in some way to update-fn so that update-fn
knows what entries in my-atom has changed.
Is there any way do 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
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