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

Add zip(iterable, selector) to RxScala #1247

Merged
merged 2 commits into from
May 27, 2014

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented May 22, 2014

/cc @samuelgruetter

@cloudbees-pull-request-builder

RxJava-pull-requests #1147 SUCCESS
This pull request looks good

@samuelgruetter
Copy link
Contributor

For zipping with an Observable, we have

def zip[U](that: Observable[U]): Observable[(T, U)]
def zipWith[U, R](that: Observable[U], selector: (T,U) => R): Observable[R]

So to be consistent, the signatures for zipping with an Iterable should be:

def zip[U](that: Iterable[U]): Observable[(T, U)]
def zipWith[U, R](that: Iterable[U], selector: (T,U) => R): Observable[R]

@samuelgruetter
Copy link
Contributor

And you could add a good and bad example to RxScalaDemo: Bad zips an Observable.interval with an infinite Observable (and thus the same happens as with the previous zip version), and good zips Observable.interval with an infinite Iterable.

@headinthebox
Copy link
Contributor

Agreed.

@benjchristensen
Copy link
Member

I'll wait until a go ahead to merge this as it seems there are additions to make.

@zsxwing
Copy link
Member Author

zsxwing commented May 23, 2014

Already updated.

@cloudbees-pull-request-builder

RxJava-pull-requests #1151 SUCCESS
This pull request looks good

@samuelgruetter
Copy link
Contributor

We should wait with this until #1253 is fixed.

@benjchristensen
Copy link
Member

Is this now ready to merge since #1253 is merged?

@headinthebox
Copy link
Contributor

Yes, it delegates to the Java one.

benjchristensen added a commit that referenced this pull request May 27, 2014
@benjchristensen benjchristensen merged commit ecedbab into ReactiveX:master May 27, 2014
@zsxwing zsxwing deleted the zip-iterable branch May 27, 2014 09:42
@benjchristensen benjchristensen mentioned this pull request Jun 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants