 
   IWatchable
   (-notify-watches [this oldval newval]
-    (doseq [[key f] watches]
-      (f key this oldval newval)))
+    (.notifySwatches this oldval newval))
   (-add-watch [this key f]
     (set! (.-watches this) (assoc watches key f))
     this)

   :-add-invalidation-watch
   (fn --add-invalidation-watch
     [this key f]
     (aset invalidation-watches key f)
     this)

   :-remove-invalidation-watch
   (fn -remove-invalidation-watch
     [this key]
     (js-delete invalidation-watches key)
     this)})

(defn cursor* [ref korks-or-getter setter lazy]

(defn get-add-remove-watch* [ref]
  (cond
    (satisfies? IInvalidates ref)
    ;[add-invalidation-watch remove-invalidation-watch]
    [(fn [ref key f] (.addInvalidationWatch ref key f))
    (fn [ref key] (.removeInvalidationWatch ref key))]
    (satisfies? IWatchable ref)
    [add-watch remove-watch]))

