intersperse

fun <T> Flow<T>.intersperse(separator: T): Flow<T>

Emits separator between each pair of consecutive upstream values.

For upstream a, b, c the output is a, separator, b, separator, c. Flows with fewer than two values are emitted unchanged.