                   
                   true ;; generate children that are leaves before children that are trees.
                   (lazy-cat (child-lexemes) (child-trees)))]
-            (assoc-children tree children f)))
+            (assoc-children tree children frontier-path)))
          [tree])
        (grow (rest trees))))))
 

           (default-fn)))
     (assoc-each-default tree (rest children) path))))

;; TODO: use recur: should be more efficient(?)
(defn- assoc-children [tree children path]
  (if (not (empty? children))
    (let [child (first children)]

   (filter #(not (= :fail %)))
   (map #(u/assoc-in! % [::done?] true))))

;; TODO: use reduce.
(defn- assoc-each-default [tree children path]
  (if (not (empty? children))
    (lazy-cat
