Skip to content

Commit d3a9c9d

Browse files
authored
Fix typo in Flow.scan and runningFold documentation (#3284)
1 parent 194e6b6 commit d3a9c9d

File tree

1 file changed

+2
-2
lines changed
  • kotlinx-coroutines-core/common/src/flow/operators

1 file changed

+2
-2
lines changed

kotlinx-coroutines-core/common/src/flow/operators/Transform.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public fun <T> Flow<T>.onEach(action: suspend (T) -> Unit): Flow<T> = transform
8181
* ```
8282
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
8383
* ```
84-
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
84+
* will produce `[], [1], [1, 2], [1, 2, 3]`.
8585
*
8686
* This function is an alias to [runningFold] operator.
8787
*/
@@ -94,7 +94,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
9494
* ```
9595
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
9696
* ```
97-
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
97+
* will produce `[], [1], [1, 2], [1, 2, 3]`.
9898
*/
9999
public fun <T, R> Flow<T>.runningFold(initial: R, @BuilderInference operation: suspend (accumulator: R, value: T) -> R): Flow<R> = flow {
100100
var accumulator: R = initial

0 commit comments

Comments
 (0)