 (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]]
+  [bolt model comp-paths bolts-at-paths depth max-depth & [top-bolt path-from-top truncate?]]
   (lazy-seq
-   (let [top-bolt (or top-bolt bolt)]
+   (let [top-bolt (or top-bolt bolt)
+         truncate? (if (= truncate? false)
+                     false
+                     true)]
      (if (empty? comp-paths)
        [bolt] ;; done: we've added all the comps to the bolt, so just return the bolt as a singleton vector.
        ;; else, more comp-paths to go.

                                 comp-bolts
                                 (+ 1 depth)
                                 max-depth
                                 top-bolt))))))))
(defn generate2
  "Return all expressions matching spec _spec_ given the model _model_."
  [spec model

  (let [depth 0
        max-depth max-total-depth]
    (flatten
     (mapfn #(add-bolt-at % % [] % model depth max-depth truncate-children)
            (lightning-bolts model spec 0 max-total-depth)))))

(defn generate-n
