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

MergeWith, ConcatWith, AmbWith #1357

Merged

Conversation

benjchristensen
Copy link
Member

Single-arity instance versions of merge, concat and amb.
Since we can't use the merge/concat/amb names on both static and instance methods, these have the With suffix, which actually reads quite well.

o.mergeWith(o2).subscribe(ts);
o.concatWith(o2).subscribe(ts);
o.ambWith(o2).subscribe(ts);

If we feel the need for more arities fine, but I wanted to start simple.

This originated from discussions with @headinthebox and over a year of wanting instance methods for merge.

Single-arity instance versions of merge, concat and amb.
Since we can't use the `merge`/`concat`/`amb` names on both static and instance methods, these have the `With` suffix, which actually reads quite well.

```java
o.mergeWith(o2).subscribe(ts);
o.concatWith(o2).subscribe(ts);
o.ambWith(o2).subscribe(ts);
```

If we feel the need for more arities fine, but I wanted to start simple.

This originated from discussions with @headinthebox and over a year of wanting instance methods for `merge`.
@cloudbees-pull-request-builder

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

@headinthebox
Copy link
Contributor

Like!

benjchristensen added a commit that referenced this pull request Jun 12, 2014
@benjchristensen benjchristensen merged commit 460459f into ReactiveX:master Jun 12, 2014
@benjchristensen benjchristensen deleted the mergeWith-and-friends branch June 12, 2014 17:34
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.

3 participants