protocol | since v0.0-927 | Edit |
Atom
Protocol for types that can be watched. Currently only implemented by Atom.
(defprotocol IWatchable
(-notify-watches [this oldval newval]
"Calls all watchers with this, oldval and newval.")
(-add-watch [this key f]
"Adds a watcher function f to this. Keys must be unique per reference,
and can be used to remove the watch with -remove-watch.")
(-remove-watch [this key]
"Removes watcher that corresponds to key from this."))