Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinsuspend compiled to state machineSingle-choice MCQ

What does this snippet print? Assume both `compute` calls suspend at the `delay`.

suspend fun compute(): Int { delay(1) return 1 } suspend fun work(): Int { val a = compute() val b = compute() return a + b } fun main() = runBlocking { println(work()) }