Last active
March 20, 2022 23:16
-
-
Save KhomDrake/63081fc735466e28a9d6d7ac70f9f027 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
suspend fun setupMovies(completion: Continuation<Any?>) { | |
when(label) { | |
0 -> { | |
val token = makeLogin("someValue", "someValue") | |
} | |
1 -> { | |
val movies = loadMovies(token) | |
} | |
2 -> { | |
printMovies(movies) | |
} | |
3 -> { | |
completion.resume(Unit) | |
} | |
else -> throw IllegalStateException(...) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment