function | previously cljs.spec/int-in-range? | clojure.spec.alpha/int-in-range? | Edit |
(int-in-range? start end val)
Return true if start <= val, val < end and val is a fixed precision integer.
(defn int-in-range?
[start end val]
(cond
(integer? val) (c/and (<= start val) (< val end))
(instance? goog.math.Long val)
(c/and (.lessThanOrEqual start val)
(.lessThan val end))
(instance? goog.math.Integer val)
(c/and (.lessThanOrEqual start val)
(.lessThan val end))
:else false))