(def primes [2 5 7])
(println primes) ; [2 5 7]
;; 向量是持久化的:不会就地修改,
;; 每个操作都返回新的向量
(def more (conj primes 11)) ; 追加到末尾
(println more) ; [2 5 7 11]
(println primes) ; [2 5 7],原向量不变
(def with-3 (into [2 3] (subvec more 1))) ; 在索引 1 处插入 3
(println with-3) ; [2 3 5 7 11]
(def tail (subvec with-3 1)) ; 去掉索引 0 处的元素
(println tail) ; [3 5 7 11]
(println (into tail [13 17])) ; [3 5 7 11 13 17],扩展
(println (vec (remove #{7} tail))) ; [3 5 11],按值删除
(println (empty tail)) ; [],“清空”就是得到空向量