数组长度

数组和集合 / 数组

(def numbers [1 2 3])

(def cnt (count numbers))
;; cnt is 3
(println cnt)

;; count 对任何集合的用法都相同
(println (count "hello"))                 ; 5
(println (count (filter odd? numbers)))   ; 2:奇数有几个
(println (empty? []))                     ; true