mapN<R> method
Behaves like the map function but iterates over n elements at a time.
Implementation
Iterable<R> mapN<R>(R Function(List<T> element) f, {required int n}) sync* {
Iterable<T> ptr = this;
while (ptr.isNotEmpty) {
yield f(ptr.take(n).toList());
ptr = ptr.skip(n);
}
}