Chunks an input stream into size chunks.
size
Eg, with a chunk size of 3, the input stream of: 1, 2, 3, 4, 5, 6 Yields: [ 1, 2, 3 ], [ 4, 5, 6 ]
If returnRemainders is true (default), any left over values are returned even if it's less than size.
returnRemainders
If true (default) left over data that didn't make a full chunk is also returned
Chunks an input stream into
size
chunks.Eg, with a chunk size of 3, the input stream of: 1, 2, 3, 4, 5, 6 Yields: [ 1, 2, 3 ], [ 4, 5, 6 ]
If
returnRemainders
is true (default), any left over values are returned even if it's less thansize
.