chunked
Splits this collection into a list of lists each not exceeding the given size.
The last list in the resulting list may have less elements than the given size.
Parameters
the number of elements to take in each list, must be positive and can be greater than the number of elements in this collection.
Samples
samples.collections.Collections.Transformations.chunkedSplits this collection into several lists each not exceeding the given size and applies the given transform function to an each.
Return
list of results of the transform applied to an each list.
Note that the list passed to the transform function is ephemeral and is valid only inside that function. You should not store it or allow it to escape in some way, unless you made a snapshot of it. The last list may have less elements than the given size.
Parameters
the number of elements to take in each list, must be positive and can be greater than the number of elements in this collection.