                                   drop-last
                                   vec)]
     (if-let [parent (get-recent-tree-at-inner-path parent-inner-path
-                                                     recent-trees)]
+                                                   recent-trees)]
       parent
       (mk-recent-tree-at-inner-path parent-inner-path recent-trees))))
 
-(defn capture-fn
+(defn tr-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)
+                   (merge template)
                    (assoc :args (vec args)
                           :arg-map (delay (zipmap (:arg-forms template)
                                                   args))


(defn mk-tree-template
  [src-map fn-meta path parent-path]
  (let [sub-src-map (-> path
                        path->sym
                        src-map)
        form (:orig sub-src-map)]
    {:parent-path parent-path
     :name (if (seq? form)
             (first form)
             form)
     :form form
     :inner-path path
     :parent-name (:name fn-meta)
     :ns (-> fn-meta :ns str symbol)
     :arg-forms (-> sub-src-map
                    :xp
                    rest)}))

(defn get-temp-root-parent
  []
  (-> trace/*trace-log-parent*
      (select-keys [:depth :path])
      (assoc :children (atom [])
             :inner-path nil
             :return ::placeholder)
      atom))

(declare produce-recent-parent-tree-atom!)

                       :return value
                       :throw throw ;;TODO not right
                       :ended-at (trace/now))]
      (assoc-to-recent-trees! #spy/d (atom this')
                              parent
                              recent-trees)
      value)))

(defn tr-macro
  [path [recent-trees] template mcro v]
  (def rt' @recent-trees)

  (let [tree-atom (produce-recent-tree-atom! path
                                             recent-trees)]

    (swap! (@recent-trees path)
           assoc
           :return v
           :inner-tags [:macro mcro])


    v))

(defn tr-if-ret
  [path [recent-trees] v]
