You have the following code:
1) fun postRequest() {
sendRequest { data ->
submitRequest(data) { result ->
confirmResult(result)
}
}
}
2) suspend fun doLongComputations() {
doSomethind()
writeResult()
}
3) fun postItem(item: Item) {
preparePostAsync()
.thenCompose { token ->
submitPostAsync(token, item)
}
.thenAccept { post ->
processPost(post)
}
Match each code piece to the name of the approach used to work with asynchronous code.