chunked

Takes arbitrary input range as an input and returns another range which produces arrays of original elements of size chunk_size.

Useful for setting granularity in parallel applications. std.algorithm.joiner composed with chunked produces same elements as were in the original range.

The difference from std.range.chunks is that any input range is allowed, no slicing or length is required. The cost is memory allocations for chunks.

chunked
(
R
)
(,)

Meta