 
 #_ (do
 
+     (def tree {:id 1 :children
+                [{:id 2}
+                 {:id 3
+                  :children [{:id 5
+                              :children [{:id 6}]}]}
+                 {:id 4
+                  :children [{:id 7
+                              :children []}
+                             {:id 8
+                              :children []}
+                             ]}]})
 
-     (def z1 (z/zipper map? :children #(assoc % :children %2)
-                       {:a 1 :children [{:a 2} {:a 3 :children []} {:a 4}]}))
+     [[[:a :even]]
+      [[:a] [] [:even]]
+      [[:a :even] []]
+      [[:a :even] [:even]]]
+
+
+
+     (def ppcp puget.printer/cprint)
+
+     (ppcp tree)
+
+     (def z1 (z/zipper map?
+                       #(-> % :children not-empty)
+                       #(assoc % :children %2)
+                       tree))
+
+     (ppcp (z/root z1))
 
 
 

(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]
