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.

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

Parameters

range
Type: Range

An input range

size
Type: size_t

chunk size

Return Value

Type: auto

Range of chunks

Meta

Since

0.0.1