We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 194e6b6 commit d3a9c9dCopy full SHA for d3a9c9d
kotlinx-coroutines-core/common/src/flow/operators/Transform.kt
@@ -81,7 +81,7 @@ public fun <T> Flow<T>.onEach(action: suspend (T) -> Unit): Flow<T> = transform
81
* ```
82
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
83
84
- * will produce `[], [1], [1, 2], [1, 2, 3]]`.
+ * will produce `[], [1], [1, 2], [1, 2, 3]`.
85
*
86
* This function is an alias to [runningFold] operator.
87
*/
@@ -94,7 +94,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
94
95
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
96
97
98
99
public fun <T, R> Flow<T>.runningFold(initial: R, @BuilderInference operation: suspend (accumulator: R, value: T) -> R): Flow<R> = flow {
100
var accumulator: R = initial
0 commit comments