wdl
wdl copied to clipboard
Add `chunk` function for splitting an array into equal-sized chunks
Checklist
- [x] Pull request details were added to CHANGELOG.md
- [x] Valid examples WDL's were added or updated to the SPEC.md (see the guide on writing markdown tests)
@patmagee the parameter is the requested chunk size, not the number of chunks. And it is stated that the last chunk can be shorter than the requested size. So e.g. if the array is of length 1 and I request a chunk size of 5, then the returned value will be an array of one array that contains one element.