`step`参数与所述行为无关:(partition n coll)只是意味着(partition n n coll),即,以n为步长的分割,它_始终_有一个步长值,这决定了在开始下一个子分割之前在coll中跳过多少个元素。Alex所描述的行为不受步长值的影响。
只有在最后生成的分割不以n个项结束的情况下,填充集合才有意义
dev=> (partition 3 3 [:a :b :c] (range 5))
((0 1 2) (3 4 :a))
dev=> (partition 3 3 (range 5))
((0 1 2))
dev=> (partition 3 2 [:a :b :c] (range 5))
((0 1 2) (2 3 4) (4 :a :b))
dev=> (partition 3 2 (range 5))
((0 1 2) (2 3 4))
dev=> (partition 3 1 [:a :b :c] (range 5))
((0 1 2) (1 2 3) (2 3 4) (3 4 :a))
dev=> (partition 3 1 (range 5))
((0 1 2) (1 2 3) (2 3 4))