Array.chunks()

From ZCubes Wiki
Jump to navigation Jump to search


Array.chunks(ChunkSize, SomeFunction)

Split the array into chunks of size ChunkSize. Apply SomeFunction to chunks, if provided.

1..25.chunks(3)

1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
16 17 18
19 20 21
22 23 24
25


See Also

pieces

parts