Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doOneThing() { callbackResult ->
- doAnotherThing(callbackResult) { anotherCallbackResult ->
- doThirdThing(anotherCallbackResult) { totalResult ->
- showResultToUser(totalResult)
- }
- }
- }
- val result = doOneThing().await()
- val secondResult = doAnotherThing(result).await()
- val totalResult = doThirdThing(secondResult).await()
- showResultToUser(totalResult)
- Single.fromCallable(doOneThing())
- .flatMap(::doAnotherThing)
- .flatMap(::doThirdThing)
- .subscribe(::showResultToUser)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement