          (parent-with-head-1 spec depth (rest parent-rules)))))))
 
 (defn get-lexemes 
-  "Get lexemes matching the spec. Use a model's index if available, where the index 
-   is a function that we call with _spec_ to get a set of indices. 
-   Otherwise use the model's entire lexeme."
+  "Get lexemes matching the spec. Use index, where the index 
+   is a function that we call with _spec_ to get a set of lexemes
+   that matches the given _spec_."
   [spec]
   (->>
    (index-fn spec)

    true []))

(defn parent-with-head
  "Return every possible tree of depth 1 from the given spec and model."
  [spec depth]
  ;; get all rules that match input _spec_:
  (if (nil? spec) (throw (Exception. (str "nope: spec was nil."))))
  (let [matching-rules
        (shuffle (->> (:grammar model)
                      (map #(unify % spec))
                      (filter #(not (= :fail %)))))]
    (->> matching-rules


(defn grow
  "recursively generate trees given 
   input trees. continue recursively
   until no futher expansion is 
   possible."
  [trees]
