ClojureDocs

导航

命名空间

分区

clojure.core

1.0 起可用 (来源)
  • (partition n coll)
  • (partition n step coll)
  • (partition n step pad coll)
Returns a lazy sequence of lists of n items each, at offsets step
apart. If step is not supplied, defaults to n, i.e. the partitions
do not overlap. If a pad collection is supplied, use its elements as
necessary to complete last partition upto n items. In case there are
not enough padding elements, return a partition with less than n items.