Skip to content

Commit

Permalink
Fix copy-paste mistake in Flow<T>.runningFold() docs (Kotlin#2836)
Browse files Browse the repository at this point in the history
  • Loading branch information
angusholder committed Jul 19, 2021
1 parent b1aadee commit 8b60fe8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend
* Note that initial value should be immutable (or should not be mutated) as it is shared between different collectors.
* For example:
* ```
* flowOf(1, 2, 3).scan(emptyList<Int>()) { acc, value -> acc + value }.toList()
* flowOf(1, 2, 3).runningFold(emptyList<Int>()) { acc, value -> acc + value }.toList()
* ```
* will produce `[], [1], [1, 2], [1, 2, 3]]`.
*/
Expand Down

0 comments on commit 8b60fe8

Please sign in to comment.