Last active
August 29, 2015 14:04
-
-
Save oehme/6362cf85d3fa82b3ee7e to your computer and use it in GitHub Desktop.
Resolving ambigous situations
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
//Preferred OnSubscribe API | |
Observable.create[ | |
onNext(9000) | |
onCompleted | |
] | |
.subscribe[ | |
println(it) | |
] | |
//force the deprecated OnSubscribeFunc API by returning a Subscription | |
Observable.create[ | |
onNext(9000) | |
onCompleted | |
return Subscriptions.empty | |
] | |
.subscribe[ | |
println(it) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment