           (merge vals1 vals2))))
 
 (defn join-q [query1 query2]
-  (let [shape (union (::shape (meta query1)) (::shape (meta query2)))
-        join-shape (intersection (::shape (meta query1)) (::shape (meta query2)))]
-    (with-meta
-      (fn [kn]
+  (let [shape (union (::shape (info query1)) (::shape (info query2)))
+        join-shape (intersection (::shape (info query1)) (::shape (info query2)))]
+    (with-info
+      (fn join-q-fn [kn]
         (join (query1 kn) (query2 kn) join-shape))
       {::shape shape})))
 
 (defn filter-q [query fns]
-  ;; (check (subset? (:aurora/selects (meta fns)) (::shape (meta query))))
-  (with-meta
-    (fn [kn]
+  ;; (check (subset? (:aurora/selects (meta fns)) (::shape (info query))))
+  (with-info
+    (fn filter-q-fn [kn]
       (into #{} (filter fns (query kn))))
-    {::shape (::shape (meta query))}))
+    {::shape (::shape (info query))}))
 
 (defn let-q [query name-sym fns]
-  ;; (check (subset? (:aurora/selects (meta fns)) (::shape (meta query))))
-  (with-meta
-    (fn [kn]
+  ;; (check (subset? (:aurora/selects (meta fns)) (::shape (info query))))
+  (with-info
+    (fn let-q-fn [kn]
       (into #{} (for [result (query kn)]
                   (assoc result name-sym (fns result)))))
-    {::shape (conj (::shape (meta query)) name-sym)}))
+    {::shape (conj (::shape (info query)) name-sym)}))
 
 (defn fill-in [template result]
   (clojure.walk/postwalk-replace result template))
 
 (defn fill-in-q [template]
-  (fn [facts]
+  (fn fill-in-q-fn [facts]
     (into #{} (map #(fill-in template %) facts))))
 
 (defn mapcat-q [fns]
   (let [selects (:aurora/selects (meta fns))]
-    (fn [facts]
+    (fn mapcat-q-fn [facts]
       (into #{} (mapcat fns (into #{} (map #(select-keys % selects) facts)))))))
 
 (declare gen*)

        update-gens (into [] (map #(project-q (with-meta (nth % 1) {:tag update-sym}) to-be) (filter #(op? '> %) clauses)))
        update-templates (into [] (map #(nth % 2) (filter #(op? '> %) clauses)))
        gen (gen* clauses)]
    (fn [kn]
      (let [facts (gen kn)
            asserts #js []
            retracts #js []]

                result (retract-f facts)]
          (.push retracts result))
        (doseq [[update-gen update-template] (map vector update-gens update-templates)
                result (join (update-gen kn) facts (intersection (::shape (info update-gen)) (::shape (info gen))))]
          (.push retracts (update-sym result))
          (.push asserts (merge (update-sym result) (fill-in update-template result))))
        [asserts retracts]))))

(defn query* [clauses]
  (let [asserts+retracts (asserts+retracts* clauses)]
    (fn query*-fn [kn]
      (let [[asserts retracts] (asserts+retracts kn)]
        (difference (set asserts) retracts)))))

(defn rule* [clauses]
  (let [asserts+retracts (asserts+retracts* clauses)]
    (with-info
      (fn rule*-fn [kn]
        (let [[asserts retracts] (asserts+retracts kn)]
          (reduce retract (reduce assert kn asserts) retracts)))
      {::preds-in (apply union (map preds-in clauses))
