partition function

Iterable<List> partition (Iterable iterable, int size)

Partitions the input iterable into lists of the specified size.

Implementation

Iterable<List> partition(Iterable iterable, int size) {
  return iterable.isEmpty ? [] : new _Partition(iterable, size);
}