Skip to content

flatZip or call it however you want... #3543

@pkafel

Description

@pkafel

Hi 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 a Observable.filter where Im filtering out all the null 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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions