lazarljubenovic / jupiterate

1 stars 0 forks source link

Introduce `chunkStrict` #14

Closed lazarljubenovic closed 1 year ago

lazarljubenovic commented 1 year ago

With #13 it's obvious that we need chunkStrict at least for the types, but it will also have a slightly different runtime behavior: it should throw if the last chunk ends up having less than chunkStrict elements.

Note that it would still actually process the majority of the array and yield the first n - 1 valid chunks.