   "Reduces an `or` whenever possible."
   [or-op]
   (cond (every? #(= :char-set (:type %)) (:args or-op))
+        ;; Not general enough. (or [ax] expr [by] "c") could be reduced to
+        ;; (or [abcxy] expr).
         {:type :char-set,
          :value (apply set/union (map :value (:args or-op)))}
         (= 1 (count (:args or-op)))

  "Reduces a `cat`, whenever possible."
  [cat-op]
  (cond (every? #(= :string (:type %)) (:args cat-op))
        {:type :string, :value (apply str (map :value (:args cat-op)))}
        (= 1 (count (:args cat-op)))
        (first (:args cat-op))

                          (get-in not-op [:args 0 :value]))})

(defn- flatten-cat
  "Flattens a `cat` inside a `cat`, whenever possible."
  [cat-op]
  (assoc cat-op
    :args (->> (:args cat-op)
