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