mapGrouped<N> method

Iterable<N> mapGrouped<N>(
  1. N map(
    1. List<T>
    ), {
  2. required int n,
})

Implementation

Iterable<N> mapGrouped<N>(
  N Function(List<T>) map, {
  required int n,
}) sync* {
  Iterable<T> ptr = this;
  while (ptr.isNotEmpty) {
    yield map(ptr.take(n).toList());
    ptr = ptr.skip(n);
  }
}