          (+ [c c c])
          (- [d d d]))
    (Knowledge. #{[2 3 4] [:a :b :c] [:b :c :d]} #{[1 2 3]} #{}))
+
+  (rule {:name :quux :quux x}
+        (> {:name :the :foo x} {:bar x}))
   )

  ((query (+ed [a b])
          (+ [a b]))
   (Knowledge. #{} #{[1 2]} #{}))

  ((set-q 'x '[b c] '[[a b c] [b c d]]) (Knowledge. #{[1 2 3] [2 3 4] [3 4 5] [2 8 9] [8 9 5]} #{} #{}))

  ((query (set x [b c]
               [a b c]


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

(defn chain [rules]
  (fn [kn]
