    node
    pred-map))
 
+#_ (get-tags' {:id 1} {:a #(-> % :id #{1}) :b #(-> % :id #{1})})
+
+(defn get-children-tags*
+  [zipr pred-map]
+  (let [this-tags (-> zipr
+                      z/node
+                      (get-tags' pred-map))]
+    (mapv #(into [this-tags] %)
+          (if-let [ch-zips (not-empty (children-zips zipr))]
+            (mapcat #(get-children-tags* % pred-map)
+                    ch-zips)
+            [[]]))))
+
 (defn get-children-tags
-  [zipr]
-  (let [kids (children-zips zipr)]
-    (apply concat (for [child-zip kids
-                        desc-tags (get-children-tags child-zip)]
-                    (map (fn [tag-trail] (conj tag-trail (get-tags' child-zip))))))))
+  [zipr pred-map]
+  (->> zipr
+       children-zips
+       (mapcat #(get-children-tags* % pred-map))
+       vec))
+
+#_ (ppcp (get-children-tags z1
+                            {:a #(-> % :id #{1 2 3 4}) :even #(-<> (do %)
+                                                                   :id
+                                                                   even?)}))
+
 
 (defn tag*
   [zipr pred-map & {:keys [parent-tags]}]

(ns com.billpiel.mem-tracer.util.tree-query
  (require [clojure.zip :as z]))

(def ^:dynamic *get-tags-mz* nil)



(defn get-tags
  [node pred-map]
  (vec (for [[kw pred] pred-map
             :when (pred node)]
         kw)))

(defn get-tags'
  [node pred-map]
