Is there any difference between `runningFold` and `scan` methods in the Kotlin collections library?

Viewed 1061
1 Answers

Apparently there is no difference, check this out:

runningFold() and runningReduce() are introduced as synonyms for scan() and scanReduce(). Such names are more consistent with the related functions fold() and reduce(). In the future, scan() will be available along with runningFold() since it’s a commonly known name for this operation. The experimental scanReduce(), however, will be deprecated and removed soon.

source: https://blog.jetbrains.com/kotlin/2020/05/1-4-m2-standard-library/

Related