Skip to content
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

doseq and for but for streams #287

Open
cgrand opened this issue Nov 16, 2023 · 0 comments
Open

doseq and for but for streams #287

cgrand opened this issue Nov 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@cgrand
Copy link
Contributor

cgrand commented Nov 16, 2023

Dart has await for to iterate over streams, we don’t have anything like this.
.forEach is less powerful (you can await inside an await for and it will pause/resume the subscription.
dostream would be like doseq but for streams (potentially mixed with some seqables) and await-for would be like but but would evaluate to a stream.
Both are poor names:

  • dostream would implicitely await the whole iteration to be over
  • await-for would not await as it would return a stream...
    So await-doseq and stream-for instead?
@cgrand cgrand changed the title do doseq and for but for streams Nov 16, 2023
@cgrand cgrand added the enhancement New feature or request label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant