`step`参数与描述的行为无关:(partition n coll)just means (partition n n coll),即以n为步长的partition,因此它_总是_有步长值,这仅决定了在开始下一个partition之前在coll中跳过多少个元素。亚历克斯描述的行为不受步长值的影响。
填充集合只有在将要生成的最后一个partition中没有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))