              bolt top-bolt model depth max-depth truncate? take-n)))))
 
 (defn add-bolt-at [top-bolt bolt path bolt-at model depth max-depth truncate? & [take-n]]
+  "at _path_ within _bolt_, add all complements derived from _bolt-at_"
   (mapfn #(do-defaults % model)
          (let [comp-paths (find-comp-paths bolt-at)]
            (mapfn #(assoc-in bolt path %)

         (dissoc :dag_unify.core/serialized))
        max-depth max-total-depth]
    (->
     (clojure.core/take
      take
      (reduce concat
              (map #(do
                      (log/trace (str "add-bolt-at:" ((:morph-ps language-model) %)))
                      (let [result (filter (fn [x] (not (= :fail x)))
                                           (add-bolt-at % % [] % language-model depth max-depth truncate-children take))]
                        result))
                   (lightning-bolts language-model spec 0 max-total-depth))))
     ((fn [seq]
        (if (= take 1)
          (first seq) ;; if caller only wants one, return just that one, rather than a singleton list.
          seq)))))) ;; otherwise, return the lazy seq of expressions


                  result))))
         bolts-at))

(defn add-comps-using [bolt model path comp-paths bolts-at-paths depth max-depth top-bolt truncate? take-n]
  (if (empty? comp-paths)
    [bolt]
    (mapfn (fn [bolt-at]
             (let [result (add-bolt-at top-bolt bolt path bolt-at model depth max-depth truncate? take-n)])))))

(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."
