                                       right-lexemes (mapcat (fn [string]
                                                               (lookup model string))
                                                             right-strings)
-                                      left-signs (vec (lazy-cat left-lexemes (filter map? left)))
-                                      right-signs (vec (lazy-cat right-lexemes (filter map? right)))]
+                                      left-signs (lazy-cat left-lexemes (filter map? left))
+                                      right-signs (lazy-cat right-lexemes (filter map? right))
+                                      ]
                                   (lazy-cat
                                    (if (and (not (empty? left-signs))
                                             (not (empty? right-signs)))

                                   (map (fn [i] [(nth tokens i)])
                                        token-count-range))]
             (log/debug (str "input map:" input-map))
;;             (println (str "input map:" input-map))
             (let [all-parses
                   (parses input-map token-count model
                           (span-map token-count) parse-with-truncate)

(defn lookup [{lookup :lookup
               lexical-cache :lexical-cache
               default-fn :default-fn} k]
  (log/debug (str "lookup: k=" k))
  (let [pre-default
        (if (or (= false parse-with-lexical-caching)
                (nil? lexical-cache))
          (lookup k)
          (let [lookup-fn (fn [k]
                            (do (log/debug (str "cache miss for " k))
                                (let [looked-up (lookup k)]
                                  (if (not (empty? looked-up)) looked-up :none))))]
            (deal-with-cache k lookup-fn lexical-cache)
            (let [cache-value (get @lexical-cache k)]
              (if (= cache-value :none) nil
                  cache-value))))]
    (log/trace (str "default-fn: nil? " (nil? default-fn)))
    (log/trace (str "pre-default: count: " (count pre-default)))
    (cond (nil? default-fn)
          pre-default
          true
          (map default-fn pre-default))))

;; TODO: use dag_unify/assoc-in rather than over/over, so that we can remove babel.over.
(defn over [grammar left right morph default-fn]
  "opportunity for additional logging before calling the real (over)"
  (if default-fn
    (->>
     (over/over grammar left right)
     (map default-fn))
    (over/over grammar left right)))

(defn square-cross-product [x]
  (mapcat (fn [each-x]
