clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
2020-05-28T20:32:35.052300Z

Saying you a spec ::a , you can get back the definition with s/form. Is it possible to extract a generator from the s/form?

alexmiller 2020-05-28T20:46:58.052700Z

sure, just eval to to get a spec object, then s/gen

alexmiller 2020-05-28T20:47:30.053100Z

but if you have ::a, you're already there, so not sure what you're driving at

alexmiller 2020-05-28T20:48:07.053600Z

one big caveat is that that s/form does not currently capture when a generator is overridden with like s/with-gen