equalsEach method

bool equalsEach(
  1. Iterable<T> other
)

Checks if this iterable equals another element by element

Implementation

bool equalsEach(Iterable<T> other) {
  final a = iterator;
  final b = other.iterator;

  while (a.moveNext()) {
    if (!b.moveNext() || a.current != b.current) return false;
  }
  return !b.moveNext();
}