Is use of clojure.spec for coercion idiomatic? : <p>I've seen use of clojure conformers to coerce data in various gists, but have also picked up an impression (I can't recall where though) that coercion (e.g. as follows) is not idiomatic use of conformers. </p>

<pre><code>(s/def :conformers/int
  (s/conformer (fn [x]
                 (cond
                  (integer? x) x
                  (re-matches #"\d+" x) (edn/read-string x)
                 :else :cljs.spec.alpha/invalid))))

(s/def :data.subscription/quantity :conformers/int)

(s/def :data/subscription (s/keys :req-un [:data.subscription/quantity]))
</code></pre>

<p>Is it true that the above is unidiomatic/unintended? And if so, what would be appropriate/idiomatic use. Where do the boundaries of the intended use lie?</p>
