Function chunk

Creates a range of ranges of length size. If the range can't be split evenly, the final chunk` will be the remaining elements.

auto auto chunk(Range) (
  Range range,
  size_t size
)
if (from.std.range.isInputRange!Range);

Parameters

NameDescription
range An input range
size chunk size

Returns

Range of chunks

Since

0.0.1