flatZip or call it however you want...
See original GitHub issueHi everybody,
Lately I have noticed that from time to time I have the following use case:
- Im zipping many observables by using
Observable.zip
- Some values are actually not interesting from my point of view (and I can know that only during the zipping when I have all the values at hand) so I need to have some value that will represent those unwanted result - usually I use
null
- Right after
Observable.zip
I have aObservable.filter
where Im filtering out all thenull
s so only the correct values are propagated further
I think that pretty neat solution would be to have a version of Observable.zip
method (it can be called completely diffrent) that is workin like zip
but accepts function that returns Observable
. Thanks to that in such a case as described above we could simply return Observable.empty()
and could skip the filtering step.
What do you think about it ?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:15 (5 by maintainers)
Top Results From Across the Web
java - flatZip in RxJava - Stack Overflow
What I'd like to be able to do is: final Observable<M> result = Observable.flatZip(obs1, obs2, transformFunc);. What's the cleanest way to do ...
Read more >Flat Zip Creation - Apple Support Communities
Basically, I want to know how to select many photos and compress all of them into a zip file but then when one...
Read more >How can I generate a flat ZIP with no folders hierarchy?
I wrote a quick script on .net to download all images scaled down to 100px, I'm able to download the zip, but I...
Read more >Flat Zip Wallet - Etsy
Check out our flat zip wallet selection for the very best in unique or custom, handmade pieces from our shops.
Read more >Longchamp Le Foulonne Flat Zip Crossbody | Bloomingdale's
Shop Le Foulonne Flat Zip Crossbody online at Bloomingdales.com. Look chic around the clock with this leather crossbody from Longchamp in an understated, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like the idea - I think this is commonly useful and vote for reopening!
I would like to argue for a flatZip as well.
Using an Array only works if all components have the same type.
Using my own static method also seems very clunky since it breaks the fluid style of RxJava call chains.
A very common use-case for us is:
The problem here is that fetchMoreData also returns a Single which is currently not really easy to handle if i don’t want to end up with a Single<Single<Data>>.
So i’m stuck with:
Which is also very ugly and required me to have some custom tuple type just to be able to return some async value.