byChunk

Returns a range that reads from the pipeline one chunk at a time.

  1. auto byChunk(S schema, size_t chunk_size)
    byChunk
    (
    S
    )
    (,
    size_t chunk_size = 0
    )
  2. auto byChunk(S schema, E[] buf)

Examples

auto arr = [ 42, 41, 40, 39, 38, 37, 36 ];
assert(arr.byChunk(2).equal([[ 42, 41 ], [ 40, 39 ], [ 38, 37 ], [ 36 ]]));
int[3] buf;
assert(arr.byChunk(buf[]).equal([[ 42, 41, 40 ], [ 39, 38, 37 ], [ 36 ]]));

Meta