| function | since v0.0-927 | Edit |
(min x)(min x y)(min x y & more)Returns the least number argument.
(min 1 2 3 4)
;; => 1
Apply it to a collection:
(apply min [1 2 3 4])
;; => 1
Returns the least of the nums.
(defn ^number min
([x] x)
([x y]
(cond
(NaN? x) x
(NaN? y) y
(< x y) x
:else y))
([x y & more]
(reduce min (cljs.core/min x y) more)))