-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add runningFold function to Flow #2641
Comments
Well, just to be fair, coming from RxJava it is much easier to find |
Thanks for pointing it out!
Indeed! This alias exists for better discoverability for people who came from reactive frameworks. |
* Otherwise Kotlin users with non-reactive background get confused by flow/stdlib inconsistency * Make it experimental to delay the final decision about the name Fixes #2641
True, the name |
@qwwdfsad the KDoc of |
…n#2645) * Otherwise Kotlin users with non-reactive background get confused by flow/stdlib inconsistency * Make it experimental to delay the final decision about the name Fixes Kotlin#2641
Kotlin supports the following functions on Collections
reduce
andrunningReduce
fold
andrunningFold
whereas Flows only support
reduce
andrunningReduce
fold
and ???Turns out the function is called
scan
, which is not consistent with the known naming scheme and hard to find. Thescan
function also exists for Collections but only acts as an alias forrunningFold
there.It would be helpful to also add the
runningFold
function to Flows.The text was updated successfully, but these errors were encountered: