-
Notifications
You must be signed in to change notification settings - Fork 36
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
[FEATURE] more combinators #184
Comments
@Niedzwiedzw it depends – which combinators did you have in mind? |
I heavily depend on stuff like .filter_map() .try_filter_map() .flat_map() .scan() .chain() .flatten() .try_flatten() .try_for_each() etc :) those are the ones that come to mind at least |
For me, that's a big missing part. |
@Niedzwiedzw @failable use {
futures_concurrency::stream::StreamExt as _,
futures_lite::{stream, StreamExt as _},
};
let a = stream::iter([1, 2, 3]);
let b = stream::iter([4, 5, 6]);
a
.merge(b)
// ^^^^^ merge from futures_concurrency
.filter(|i| i % 2 == 0)
// ^^^^^^ filter from futures_lite
.for_each(|i| println!("{i}"))
.await; In my opinion, there is no need to overload the crate in any additionals. But I wonder is it possible to use |
@nanoqsh I don't know if this issue refers to So that you can do |
could even be a separate extension trait, like futures-util does |
futures-util
StreamExt and TryStreamExt provide bunch of very useful (addictive?) combinators. I wonder if introducing something like that would be accepted as a PR for this project.The text was updated successfully, but these errors were encountered: