Iterable<T> whereIndex(bool Function(T value, int index) test) sync* { int i = 0; for (T e in this) { if (test(e, i++)) { yield e; } } }