       (let [head (first form)]
         (cond
           false "TODO"
+          (= 'loop head) (apply xpand-loop args)
           (= 'recur head) (apply xpand-recur args)
           (= 'if head) (apply xpand-if args)
           :else (apply xpand-fn head args)))

    (recur (inc a))
    a))


#_ (inner-tracer {:qual-sym 'com.billpiel.sayid.inner-trace3/f1
                  :meta' {:ns 'com.billpiel.sayid.inner-trace3
                          :name 'com.billpiel.sayid.inner-trace3/f1}
                 :ns' 'com.billpiel.sayid.inner-trace3})

  (or (meta form)
      (-> form first meta)))

(defn tr-loop
  [template tree-atom v]
  (-> (produce-recent-tree-atom! (:inner-path template)
                                 (:path-parents template)
                                 tree-atom)
      deref
      (merge template)
      (assoc :return v
             :inner-tags [:loop])
      (update-tree! tree-atom))
  v)

(defn xpand-loop-form
  [[_ binds & body] path-sym recur-arities]
  `(tr-loop ~path-sym
            ~'$$
            (loop ~binds
              (let [~'$$return ~@body]
                ~(mk-recur-handler recur-arities)))))

(defn xpand-loop
  [form src-map fn-meta path path-parent]
  (let [xmap (xpand-all form
                        src-map
                        fn-meta
                        path
                        path-parent)]
    (layer-xpansion-maps xmap
                         {:path-parents {path path-parent}
                          :templates {path (mk-tree-template src-map
                                                             (get-form-meta-somehow form)
                                                             fn-meta
                                                             path)}
                          :form (xpand-loop-form (:form xmap)
                                                 (path->sym path)
                                                 (:recur xmap))})))

(defn tr-recur
  [template tree-atom & args]
  (let [args' (with-meta (vec args) {::util/recur true})]
