       (do (log/trace (str "no compiled bolts found for: " search-for-key))
           (lazy-seq (lightning-bolts model spec 0 depth))))))
 
+;; a 'lightning bolts' is a dag that
+;; has among paths, paths like [:head :head :head] and
+;; pictorially look like:
+;; 
+;; 
+;;   H        H    H
+;;    \      /      \
+;;     H    H        H        ...
+;;    /      \        \
+;;   H        ..       ..
+;;    \
+;;     ..
+;; 
+;; Each bolt has has a head child.
+;; Each head child may be a leaf or
+;; otherwise has a child with the same two
+;; possibilities: either it's a leaf or itself
+;; a bolt, up to the maximum depth.
 (defn lightning-bolts
   "Return every possible bolt for the given model and spec. Start at the given depth and
    keep generating until the given max-depth is reached."
   [model spec depth max-depth & [use-candidate-parents]]
-  ;; 'lightning bolts' look like:
-  ;; 
-  ;; 
-  ;;   H        H    H
-  ;;    \      /      \
-  ;;     H    H        H        ...
-  ;;    /      \        \
-  ;;   H        ..       ..
-  ;;    \
-  ;;     ..
-  ;; 
-  ;; Each bolt is a tree with only one child per parent: the head child.
-  ;; Each head child may be a leaf or
-  ;; otherwise has a child with the same two options (leaf or a head child),
-  ;; up to the maximum depth.
   (log/debug (str "lightning-bolts: depth="
                   depth "; spec=" (dag_unify.core/strip-refs spec)))
   (if (and (< depth max-depth)

                (not (= :verb (get-in % [:synsem :cat])))))
   (map
    (fn [lexeme]
      (do
        (log/debug (str "get-lexemes: testing lexeme: "
                        (dag_unify.core/strip-refs lexeme)))
        (let [result (unify lexeme spec)]
          (if (= result :fail)
            (log/debug (str "fail-path:"
                            (dag_unify.core/fail-path lexeme spec))))
          result))))
   (filter #(not (= :fail %)))))

(defn show-spec [spec]

                       (assoc-in candidate-parent [:head] head))))
           (lightning-bolts model spec depth max-depth (rest candidate-parents))))
        []))
    (let [lexemes (shufflefn (get-lexemes model spec))]
      (if (empty? lexemes)
        (log/debug (str "lightning-bolts: no lexemes at depth: " depth
                        " for spec: " (dag_unify.core/strip-refs spec)))
        (log/debug (str "lightning-bolts at depth: " depth
                        " first lexeme:" "'"
                        ((:morph model) (first lexemes))
                        "'")))
      lexemes)))

(defn add-comps-to-bolt
