Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumKotlinFlow cold streamsSingle-choice MCQ

What is the result of collecting this flow into a list?

import kotlinx.coroutines.flow.* import kotlinx.coroutines.runBlocking fun main() = runBlocking { val result = (1..5).asFlow() .map { it } .transform { value -> emit(value) emit(value * 10) } .take(3) .toList() println(result) }