macro | previously cljs.spec/int-in | clojure.spec.alpha/int-in | Edit |
(int-in start end)
Returns a spec that validates fixed precision integers in the range from start (inclusive) to end (exclusive).
(defmacro int-in
[start end]
`(spec (and c/int? #(int-in-range? ~start ~end %))
:gen #(gen/large-integer* {:min ~start :max (dec ~end)})))