whereIndexed method
The elements whose value and index satisfies test
.
Implementation
Iterable<E> whereIndexed(bool Function(int index, E element) test) sync* {
for (var index = 0; index < length; index++) {
var element = this[index];
if (test(index, element)) yield element;
}
}