 
 (defmethod problem-group-str :problem/not-in-set [_type spec-name val path problems opts]
   (assert (apply = (map :val problems)) (str util/assert-message ": All values should be the same, but they are " problems))
-  (printer/format
-   "%s
-
-%s
-
-%s"
-   (header-label "Spec failed")
-   (show-spec-name spec-name (printer/indent (*value-str-fn* spec-name val path (problems/value-in val path))))
-   (expected-str _type spec-name val path problems opts)))
+  (format-err "Spec failed"
+              spec-name
+              val
+              path
+              (expected-str _type spec-name val path problems opts)))
 
 (defmethod expected-str :problem/missing-spec [_type spec-name val path problems opts]
   (->> problems

(defmethod problem-group-str :problem/check-fn-failure [_type spec-name val path problems opts]
  (s/assert ::singleton problems)
  (printer/format
   "%s

%s

%s"
   (header-label "Function spec failed")
   (ansi/color (printer/indent (pr-str (:expound/check-fn-call (first problems)))) :bad-value)
   (expected-str _type spec-name val path problems opts)))

     :problems problems
     :form form}))

;; TODO private
(defn ^:private expected-str2 [problems opts]
  (let [problem (first problems)
        {:keys [type spec-name val in]} (problem-parts problem opts)]
    (expected-str type spec-name val in problems opts)))

(def ^:private format-str "%s\n\n%s\n\n%s")
(defn ^:private format-err [header spec-name form in expected]
  (printer/format
   format-str
   (header-label header)
   (show-spec-name spec-name (printer/indent (*value-str-fn* spec-name form in (problems/value-in form in))))
   expected))

(defmethod problem-group-str :problem/value-group [_type spec-name val path problems opts]
  (let [problem (first problems)
        subproblems (:problems problem)
        {:keys [form in]} (problem-parts (first subproblems) opts)
        grouped-subproblems (vals (group-by :expound.spec.problem/type subproblems))]
    (format-err "Spec failed"
                spec-name
                form
                in
                (string/join
                 "\n\nor\n\n"
                 (map #(expected-str2 % opts) grouped-subproblems)))))

(defmethod expected-str :problem/missing-key [_type spec-name val path problems opts]
  (explain-missing-keys problems))

(defmethod problem-group-str :problem/missing-key [_type spec-name val path problems opts]
  (assert (apply = (map :val problems)) (str util/assert-message ": All values should be the same, but they are " problems))
  (format-err "Spec failed"
              spec-name
              val
              path
              (expected-str _type spec-name val path problems opts)))

(defmethod expected-str :problem/not-in-set [_type _spec-name _val _path problems _opts]
  (let [combined-set (apply set/union (map :pred problems))]
