nchunks method

Iterable<Iterable<T>> nchunks(
  1. int n
)

split iterable into n chuncks of as equal size and fille the last chunk with the remaining elements

Implementation

Iterable<Iterable<T>> nchunks(int n) => chunks((length / n).ceil());