                  (repeatedly 5 #(vector (java.util.UUID/randomUUID) :junk 42))))
     (fire-rules)))
 
+(fact-events state-0)
 ;(-> [tuple-session] clara.rules.compiler/to-beta-graph clojure.pprint/pprint)
 ;(-> [tuple-session] clara.rules.compiler/to-alpha-tree clojure.pprint/pprint)
 ;(inspect/inspect tuple-session)
 ;(inspect/explain-activations tuple-session)
 
-(def trace-0 (trace/get-trace state-0))
+
 
 (defn trace-by-type [trace]
   (select-keys

    [:add-facts :add-facts-logical :retract-facts :retract-facts-logical]))

(defn retractions [trace-by-type]
  (select-keys trace-by-type [:retract-facts :retract-facts-logical]))

(defn insertions [trace-by-type]
  (select-keys trace-by-type [:add-facts :add-facts-logical]))

    {:added (into [] (vals (select-disjoint hashed-adds hashed-retracts)))
     :retracted (into [] (vals hashed-retracts))}))

(def trace-0 (trace/get-trace state-0))
(retractions (trace-by-type trace-0))
(insertions (trace-by-type trace-0))
(split-ops trace-0)

(entities-where state-0 :attr/a)
