unzip method

(List<T>, List<U>) unzip()

Converts an iterator of pairs into a pair of containers.

Implementation

(List<T>, List<U>) unzip() {
  final first = <T>[];
  final second = <U>[];
  for (final (t, u) in this) {
    first.add(t);
    second.add(u);
  }
  return (first, second);
}