Kotlin: coroutines basics

Example:

fun main() { launch { delay(1000L) print("World!") } print("Hello, ") }
Coroutines provide a way to write asynchronous code in a sequential manner.

Solution:

import kotlinx.coroutines.* fun main() = runBlocking { launch { delay(1000L) print("World!") } print("Hello, ") }

Beginner's Guide to Kotlin