Created
August 4, 2014 17:54
-
-
Save moswald/33843c5478ac80b003d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// holy verbosity, batman, is this (Java): | |
someObj.getObservable() | |
.switchMap(new Func1<Void, Observable<Void>>() | |
{ | |
@Override | |
public Observable<Void> call(Void _) | |
{ | |
return someObj.getUserObservable() | |
.map(new Func1<User, Void>() | |
{ | |
@Override | |
public Void call(User _) | |
{ | |
return null; | |
} | |
} | |
} | |
} | |
// ...really equivalent to this (C#): | |
someObj.Observable | |
.SelectMany(_ => someObj.UserObservable) | |
.Select(_ => Unit.Default); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment