> Also, (remove-watch a key) fails to raise an error if a doesn't have any > watches associated with key.
Just curious why you would want it to? Might you be equally served with something like (get-watches a) so you can determine if a key is there to be removed? (defn get-watches [#^clojure.lang.IRef r] (.getWatches r)) user=> (def r (atom 1)) user=> (def r-watcher (atom 1)) user=> (add-watch r r-watcher (fn [me r old new] (reset! me new))) user=> (get-watches r) {#<a...@ff057f: 1> #<user$eval__11$fn__13 user $eval__11$fn_...@5e176f>} user=> ((get-watches r) r-watcher) #<user$eval__11$fn__13 user$eval__11$fn_...@5e176f> user=> (swap! r inc) 2 user=> @r-watcher 2 Regards, Tim. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---