chunked method

Iterable<Iterable<E>> chunked(
  1. int size
)

Splits this collection into a Iterable of iterables each not exceeding the given size.

The last Iterable in the resulting Iterable may have fewer elements than the given size.

Implementation

Iterable<Iterable<E>> chunked(int size) =>
    windowed(size: size, step: size, partialWindows: true);