Skip to content

Commit 8b60fe8

Browse files
authored
Fix copy-paste mistake in Flow<T>.runningFold() docs (#2836)
1 parent b1aadee commit 8b60fe8

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
9393
* Note that initial value should be immutable (or should not be mutated) as it is shared between different collectors.
9494
* For example:
9595
* ```
96-
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
96+
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
9797
* ```
9898
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
9999
*/

0 commit comments

Comments
 (0)