We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is a trivial extension with the only focus on readability. I tried to implement a trivial plus (a.k.a. concat) operator:
operator fun <T> Flow<T>.plus(other: Flow<T>): Flow<T> = flow { this@plus.collect(this) other.collect(this) }
Is emitAll more readable?
operator fun <T> Flow<T>.plus(other: Flow<T>): Flow<T> = flow { emitAll(this@plus) emitAll(other) } public suspend inline fun <T> FlowCollector<T>.emitAll(other: Flow<T>) { other.collect(this) } public suspend inline fun <T> FlowCollector<T>.emitAll(values: Iterable<T>) { for (value in values) emit(value) }
The text was updated successfully, but these errors were encountered:
Use case #1168
Sorry, something went wrong.
Scan and emitAll operators
a7a0dde
Fixes #1094
33befbf
26daec6
d5478b6
No branches or pull requests
This is a trivial extension with the only focus on readability.
I tried to implement a trivial plus (a.k.a. concat) operator:
Is emitAll more readable?
The text was updated successfully, but these errors were encountered: