• (min x)
  • (min x y)
  • (min x y & more)
Returns the least of the nums.

2 Examples top

  • user=> (min 1 2 3 4 5)  
    1
    user=> (min 5 4 3 2 1)
    1
    user=> (min 100)
    100
  • ;; If elements are already in a sequence, use apply
    user=> (apply min [1 2 3 4 3])
    1
    user=> (apply min '(4 3 5 6 2))
    2
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1060 top

(defn min
  "Returns the least of the nums."
  {:added "1.0"
   :inline-arities >1?
   :inline (nary-inline 'min)}
  ([x] x)
  ([x y] (. clojure.lang.Numbers (min x y)))
  ([x y & more]
   (reduce1 min (min x y) more)))
Vars in clojure.core/min:
Used in 0 other vars

Comments top

No comments for min. Log in to add a comment.