wdl icon indicating copy to clipboard operation
wdl copied to clipboard

Add `chunk` function for splitting an array into equal-sized chunks

Open jdidion opened this issue 3 months ago • 1 comments

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)

jdidion avatar Mar 28 '24 20:03 jdidion

@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.

jdidion avatar Apr 09 '24 19:04 jdidion