function can be used to only notify when an element has changed.</p>
</div><div class="code">
    <pre><code class="clojure">(def ov (ova [0 1 2 3 4 5]))

(def output (atom []))

(watch/add   ;; key, ova, ref, previous, next
 ov :elem-old-new
 (fn [k o r p n]
   (swap! output conj [p n]))
 {:select identity
  :diff true})

(do (&lt;&lt; (!! ov 0 :zero))  ;; a pair is added to output
    (deref output))
=&gt; [[0 :zero]]

(do (&lt;&lt; (!! ov 0 0))      ;; another pair is added to output
    (deref output))
