indexed
Pairs each element with its (0-based) index: (index, value).
Lecture
indexed is zip against an implicit
counter: each element comes out paired as (index, value),
counting up from 0. It's the lazy-pipeline answer to a
manual for (var i = 0; i < list.length; i++) loop — no
counter variable to manage, and it composes with the rest of the chain.
indexed is the Dart-idiomatic name (it mirrors
Iterable.indexed); fxdart also accepts the FxTS spelling
zipWithIndex — they're the same operator.
Because it only needs to track a running counter, indexed
stays lazy and works over an infinite source just as well as a finite
one; the async form counts the same way as elements resolve.
Demo 1 · Basics
Demo 2 · Async
Try it yourself
Exercise: pair each runner with their (0-based) finishing position.