Difference between revisions of "Array.chunks()"
Jump to navigation
Jump to search
(Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...") |
|||
Line 4: | Line 4: | ||
− | ==Array.chunks(ChunkSize) == | + | ==Array.chunks(ChunkSize, SomeFunction) == |
− | Split the array into chunks of size ChunkSize. | + | Split the array into chunks of size ChunkSize. Apply SomeFunction to chunks, if provided. |
1..25.chunks(3) | 1..25.chunks(3) |
Revision as of 20:53, 21 March 2024
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 |