         lexemes-before-phrases
         (lexemes-before-phrases depth max-depth)]
     (if lexemes-before-phrases
-      (lazy-cat lexemes bolts-at)
-      (lazy-cat bolts-at lexemes))))
+      (lazy-seq (concat lexemes bolts-at))
+      (lazy-seq (concat bolts-at lexemes)))))
 
 (declare add-bolt-at)
 
 (defn add-comps
   "given a bolt, return the lazy sequence of all bolts derived from this bolt after adding,
    at each supplied path in comp-paths, the bolts for that path."
-  [bolt model comp-paths bolts-at-paths depth max-depth & [top-bolt path-from-top truncate?]]
+  [bolt model comp-paths bolts-at-paths depth max-depth & [top-bolt truncate? take-n]]
   (lazy-seq
    (let [top-bolt (or top-bolt bolt)
          truncate? (if (= truncate? false)

     (flatten
      (mapfn #(do
                (log/debug (str "top-level add-bolt-at: " ((:morph-ps model) %)))
                (add-bolt-at % % [] % model depth max-depth truncate-children))
             (lightning-bolts model spec 0 max-total-depth)))))

(defn generate-n

;; TODO: lightning-bolts should use this.
(defn get-lexemes [model spec]
  (if (= false (get-in spec [:phrasal] false))
    (lazy-seq (filter #(not-fail? (unify % spec))
                      (if-let [index-fn (:index-fn model)]
                        (index-fn spec)
                        (flatten (vals
                                  (or (:lexicon (:generate model)) (:lexicon model)))))))))
  
(defn comp-path-to-bolts
  "return a lazy sequence of bolts for all possible complements that can be added to the end of the _path_ within _bolt_."
