indexed

fun <T> Stream<T>.indexed(): Stream<Pair<Int, T>>

Map the stream to pairs of index to value.

The first index is 0.