   (-equiv [this other]
           (and (instance? Fact other)
                (= shape (.-shape other))
-               (== (alength values) (alength (.-values other)))
-               (loop [i 0]
-                 (if (>= i (alength values))
-                   true
-                   (if (= (aget values i) (aget (.-values other) i))
-                     (recur (+ i 1))
-                     false)))))
+               (arr= values (.-values other))))
 
   IHash
   (-hash [this]

  (-seq [this]
        (keys (.-transient-map this))))

;; TODO facts and plans need to be serializable

;; FACTS

  (let [unchanged? (and (= (:plan old-state) (:plan new-state))
                        (every?
                         (fn [shape]
                           (and (arr= (get-facts old-state :known|pretended shape) (get-facts new-state :known|pretended shape))
                                (arr= (get-facts old-state :remembered shape) (get-facts new-state :remembered shape))
                                (arr= (get-facts old-state :forgotten shape) (get-facts new-state :forgotten shape))))
                         (get-in old-state [:plan :kind->shape :known])))]
    (js/console.timeEnd "unchanged?")
    unchanged?))
