 (defn bind-linear
   "The value of ref1 at address1 and the value of ref2 at address2
    are linked, so that if one changes, then the other chnages to
-   maintain value2 == (+ offset (* factor value1))."
+   maintain (== value2 (+ offset (* factor value1)))."
   [[ref1 address1] [factor offset] [ref2 address2]]
   (follow-linear [ref1 address1] [factor offset] [ref2 address2])
   (follow-linear [ref2 address2] [(/ factor) (- (/ offset factor))] [ref1 address1]))

(defn bind-function
  "The value of ref1 at address1 and the value of ref2 at address2
   are linked, so that if one changes, then the other changes to
   maintain value2 == (function value1)."
  [[ref1 address1] function inverse-function [ref2 address2]]
  (follow-function [ref1 address1] function [ref2 address2])
  (follow-function [ref2 address2] inverse-function [ref1 address1]))


(defn update-at
  "Like update-in, but if ks is empty, applies function directly
   to m. A single keyword also can be used."
  [m ks function & args]
  (if (empty-address? ks)
    (apply function m args) 
