mapIndexed

inline fun <A, B> Flow<A>.mapIndexed(crossinline f: suspend (index: Int, value: A) -> B): Flow<B>(source)

Returns a flow containing the results of applying the given f function to each value and its index in the original flow.