       (f (first coll))
       (lazy-mapcat f (rest coll))))))
 
-(defn lexemes-before-phrases [depth max-total-depth]
-  "returns true or false: true means generate by adding lexemes first; otherwise, by adding phrases first. Takes depth as an argument, which makes returning true (i.e. lexemes first) increasingly likely as depth increases."
+(defn lexemes-before-phrases
+  "returns true or false: true means generate by adding lexemes first;
+  otherwise, by adding phrases first. Takes depth as an argument,
+  which makes returning true (i.e. lexemes first) increasingly likely
+  as depth increases."
+  [depth max-total-depth]
   (if (not randomize-lexemes-before-phrases)
     false
     (if (> max-total-depth 0)

           (lazy-cat lexical phrasal)
           (lazy-cat phrasal lexical))))))

(defn add-all-comps [bolts language-model total-depth truncate-children max-total-depth]
  "At each point in each bolt in the list of list of bolts,
_bolt-groups_, add all possible complements at all open nodes in the
bolt, from deepest and working upward to the top. Return a lazy
sequence of having added all possible complements at each node in the
bolt."
  (lazy-mapcat
   (fn [bolt]
     (add-all-comps-with-paths [bolt] language-model total-depth

        (> (* 10 prob) (rand-int 10)))
      false)))

(defn spec-info
  "give a human-readable summary of _spec_."
  [spec]
  (strip-refs
   (merge
    (if-let [cat (get-in spec [:synsem :cat])]
