Array.parts()

From ZCubes Wiki
Jump to navigation Jump to search


Array.parts(PartSize, SpecificPartOrFunction)

Divides the array into parts of PartSize. The part indexed by SpecificPartOrFunction is given if requested. SpecificPartOrFunction, if a function, is applied to each of the parts.


1..10.parts(3)

1 2 3
4 5 6
7 8 9 10

1..10.parts(3,2)

7
8
9
10


See Also

chunks

pieces