Open danielcompton opened 5 years ago
(Great job on the lib BTW! =))
I think using metas is a good idea. Orchestra does the same:
; :fn specs can be specified using the fn's meta map.
(defn-spec my-abs number?
{:fn #(= (:ret %) (-> % :args :n))}
[n number?]
(Math/abs n))
@danielcompton I am really missing this feature as it forces me to duplicate fn specs with fdef
in my test namespace so that I could check them with clojure.spec.test.alpha/check
. What do you think about adding them via metadata? Would you be interested in a PR?
what about using metas for that?
or even use a conditions-map syntax: