forEachWhile method

*<Null safety>*

void forEachWhile (bool action(E element))

Implementation

void forEachWhile(bool Function(E element) action) {
  for (var index = 0; index < length; index++) {
    if (!action(this[index])) break;
  }
}