Partition
The collection split into consecutive, non-overlapping chunks of length n.
Wikipedia
Partition of a setMathWorldSetPartitionWikidataQ381060Britannicatopic/partition-of-a-setWolfram LanguagePartition✓Partition(collection, n)the collection split into non-overlapping chunks of length `n`.Partition(collection, n, d)overlapping sliding windows of length `n`, offset by `d` between windows.Details
- Flatten undoes Partition: chunking and re-flattening recovers the original list.
- With
, windows overlap; the two-argument form is equivalent to , giving non-overlapping chunks. - compute-engine keeps the ragged remainder instead.
- compute-engine's Partition doesn't yet.
Examples
See also: Flatten