chunks method
Returns an iterator over chunkSize
elements of the slice at a time, starting at the beginning of the slice.
The chunks are slices and do not overlap. If chunkSize
does not divide the length of the slice,
then the last chunk will not have length chunkSize.
Panics if chunkSize
is 0 or less.
Implementation
Iter<Slice<T>> chunks(int n) {
return Iter.fromIterable(_chunksHelper(n));
}