zipWithNext

fun <T> Flow<T>.zipWithNext(): Flow<Pair<T, T>>(source)

This function is an alias to pairwise operator.

Groups pairs of consecutive emissions together and emits them as a pair.

See also


fun <T, R> Flow<T>.zipWithNext(transform: suspend (a: T, b: T) -> R): Flow<R>(source)

This function is an alias to pairwise operator.

Groups pairs of consecutive emissions together and emits the result of applying transform function to each pair.

See also