1.实现一个函数(big st n),当字符串长度不超过n个字符时返回true.
(defn big [st n] (< (count st) n))
(big "aaaa" 3) // false
(big "aaaa" 5) // true
2.实现一个函数(collection-type col),根据给定集合col的类型返回:list,:map,:vector
(defn collection-type [col] (if (list? col) :list (if (map? col) :map :vector)))
(collection-type '(1 2 3))
(collection-type {:a 1, :b 2})
(collection-type [1 2 3])
// (collection-type #{1 2 3}) // hashset