(def min-value (min 2 1 3))
;; min-value is 1
(def max-value (max 2 1 3))
;; max-value is 3
;; 对于集合,用 apply 展开参数
(def numbers [2 1 3])
(def min-of-coll (apply min numbers))
;; min-of-coll is 1
(def max-of-coll (apply max numbers))
;; max-of-coll is 3
;; max-key 选出函数值最大的元素
(def longest (max-key count "one" "three" "two"))
;; longest is "three"
(println min-value max-value min-of-coll max-of-coll)
(prn longest)