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?
Dart has
await for
to iterate over streams, we don’t have anything like this..forEach
is less powerful (you canawait
inside anawait for
and it will pause/resume the subscription.dostream
would be likedoseq
but for streams (potentially mixed with some seqables) andawait-for
would be likebut
but would evaluate to a stream. Both are poor names:dostream
would implicitely await the whole iteration to be overawait-for
would not await as it would return a stream... Soawait-doseq
andstream-for
instead?