             (if (< i (alength dup-value-ixes))
               (when (= (aget source (aget dup-value-ixes i)) (aget source (aget dup-var-ixes i)))
                 (recur (+ i 1)))
-              (let [sink (make-array (alength var-ixes))]
-                (dotimes [i (alength var-ixes)]
-                  (aset sink i (aget source (aget var-ixes i))))
-                (Fact. nil sink (fact-hash sink))))))))))
+              fact)))))))
 
 ;; CLAUSES
 

          (do
            (apush dup-value-ixes dup-value-ix)
            (apush dup-var-ixes ix))
          (do
            (apush var-ixes ix)
            (swap! seen? assoc value ix)))
        (do
          (apush constant-values value)
          (apush constant-ixes ix))))
    `(pattern->deconstructor* ~constant-values ~constant-ixes ~var-ixes ~dup-value-ixes ~dup-var-ixes)))

(defn pattern->deconstructor* [constant-values constant-ixes var-ixes dup-value-ixes dup-var-ixes]
  (fn [fact]
    (let [source (.-values fact)]
      (loop [i 0]

      (recur @plan&nodes&vars computes-skipped))))

(defn join-clauses [plan nodes-a vars-a nodes-b vars-b]
  (let [key-vars (disj (intersection (set vars-a) (set vars-b)) '_)
        key-vars-a (sort-by #(ix-of vars-a %) key-vars)
        key-vars-b (sort-by #(ix-of vars-b %) key-vars)
        val-vars (disj (union (set vars-a) (set vars-b)) '_)
        index-ixes-a (ixes-of vars-a key-vars-a)
        index-ixes-b (ixes-of vars-b key-vars-b)
        lookup-ixes-a (ixes-of vars-a key-vars-b)
