 (defn xpand-body
   [parent-fn-meta idx fn-body]
   (let [[args & tail] fn-body]
-    (cons args  ;; wrong
-          (xpand (with-meta (vec tail)
+    (assoc (xpand (with-meta (vec tail)
                    {:outer true})
                  idx
-                 parent-fn-meta))))
+                 parent-fn-meta)
+           :args
+           args)))
 
 #_(defn xpand-fn*
   [form parent-fn-meta]


(defn xpand-fn
  [head form src-map fn-meta path path-parent]
  (let [path-parent' (conj path-parent path)]
    {:template {path (mk-tree-template src-map
                                       (get-form-meta-somehow form)
                                       fn-meta
                                       path-parent')}
     :form (xpand-fn-form head
                          (xpand-all form
                                     src-map
                                     fn-meta
                                     path
                                     path-parent'))}))

#_(defn xpand-form
  [form src-map fn-meta & [path path-parent]]

                  (map-indexed (partial xpand-body
                                        parent-fn-meta))
                  prep-traced-bods)]
    `(let [~'$$paths ~(:paths bods)
           ~@(:templates bods)]
       (fn ~@(:form bods)))))

(defn get-fn
  [[d s f & r]]
