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-11-23T13:32:29.433900Z

Is it possible to extract the argument list e.g (s/cat :x int?) from an existing spec?

2020-11-23T13:33:29.434600Z

(s/arg foo) ;;=> [{:x int?}]

borkdude 2020-11-23T13:50:41.435100Z

@drewverlee I'm not entirely clear on what your code should do, but maybe s/form is something that's useful for you?

2020-11-23T20:07:28.437800Z

thanks @borkdude and @sgepigon that answers the question for me.

👍 1