                 (mapcat (fn [tree]
                            (default-fn tree)))))))
 
+(defn generate-with-paths [tree paths]
+  (if (empty? paths) tree
+      (let [path (first paths)
+            truncate-at
+            (cond (= :head (last path))
+                  (u/dissoc-paths [path])
+                  true
+                  (u/dissoc-paths [(butlast path)]))]
+        (-> tree
+            (basecamp-at-spec path)
+            (u/dissoc-paths [truncate-at])
+            (generate-with-paths (rest paths))))))
+
 (defn nextcamp []
   (let [parse (-> "the small dogs you see" parse first)]
     (pprint (u/get-in parse [:synsem :sem]))))

   {:subcat []
    :cat :verb
    :sem {:pred :see
          :obj {:pred :chair
                :spec {:def :def}
                :mod {:first {:pred :red}}}
          :subj {:pred :dog
                 :mod {:first {:pred :small}}}}}})

(def basic-spec {:synsem {:subcat []
                          :cat :verb}})

(def the-static-tree
  (unify
    (create-the-static-tree)
    semantics
    basic-spec))

;; can be used to determine how generation speed is affected by
;; lexicon size

                         lexemes)))))

(declare basecamp-at-spec)
(declare generate-with-paths)

(defn basecamp []
  (generate-with-paths
    (unify
     the-static-tree
     semantics)
    [[:head :head]
     [:head :comp :head :head]
     [:head :comp :head :comp]
     [:head :comp :comp]
     [:comp :head :head]
     [:comp :head :comp]
     [:comp :comp]]))
    
(defn basecamp-at-spec [tree path]
  (let [lexemes (matching-lexemes (u/get-in tree path))]
