             [clara.rules.accumulators :as acc]))
 
 
+(defn attr-ns [attr]
+  (subs (first (clojure.string/split attr "/")) 1))
+
 (defn map->tuple [m]
   (let [eid     (:db/id m)
         temp-id (random-uuid)]

;  []
;  [?showing <- Showing])
;
;(defquery find-visible-todos
;  []
;  [?visible-todos <- VisibleTodos])
;
;(defquery find-todos
;  []
;  [?todos <- (acc/all) :from [Todo]])
;
;(defquery find-todo
;  [:?id])
;  [?todo <- Todo (= id ?id)])
;
(defn entity-tuples->entity-map
  "Takes list of tuples for a single entity and returns single map"
  [tups]
  (reduce
    (fn [acc [e a v]]

(def facts
  (apply concat
    (map->tuple (toggle-tx (random-uuid) true))
    (map->tuple (visibility-filter-tx (random-uuid) :all))
    (mapv map->tuple (repeatedly 5 #(todo-tx (random-uuid) "TODO" nil)))))


