                        :return value
                        :throw throw ;;TODO not right
                        :ended-at (trace/now))]
-      (assoc-to-recent-trees! (atom this')
+      (assoc-to-recent-trees! #spy/d (atom this')
                               parent
                               recent-trees)
       value)))
 
 (defn tr-macro
-  [path [recent-trees] mcro v]
+  [path [recent-trees] template mcro v]
+  (def rt' @recent-trees)
+
   (let [tree-atom (produce-recent-tree-atom! path
-                                    recent-trees)])
-  (swap!
-         assoc
-         :return v
-         :inner-tags [:macro mcro])
-  v)
+                                             recent-trees)]
+
+    (swap! (@recent-trees path)
+           assoc
+           :return v
+           :inner-tags [:macro mcro])
+
+
+    v))
 
 (defn tr-if-ret
   [path [recent-trees] v]

                                  drop-last
                                  vec)]
    (if-let [parent (get-recent-tree-at-inner-path parent-inner-path
                                                     recent-trees)]
      parent
      (mk-recent-tree-at-inner-path parent-inner-path recent-trees))))

(defn capture-fn
  [inner-path [recent-trees src-map] template f]
  (fn [& args]
    (let [parent (produce-recent-parent-tree-atom! inner-path
                                                   recent-trees)
          this (-> (trace/mk-tree :parent @parent)
                   (assoc :args (vec args)
                          :arg-map (delay (zipmap (:arg-forms template)
                                                  args))

       ~'$return)))

#(do
   (def form1 '(-> 1 inc str))

   (-/p (xpand form1 {:name "name1" :ns "ns1"} ))

