Last active
October 9, 2018 18:47
-
-
Save mayojava/287c8bdca9f647786416d8bf81fa3fb9 to your computer and use it in GitHub Desktop.
Shows a function that calls two asynchronous functions to login in a user and fetch list of orders
This file contains hidden or 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
fun showUserOrders(username: String, password: String) { | |
val user = login(username, password) | |
val orders = fetchUserOrders(user.userId) | |
showUserOrders(orders) | |
} | |
fun login(username: String, password: String) { } | |
fun fetchUserOrders(userId: Long) { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment