xref: /aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/guide/example-flow-12.kt (revision 7a7160fed73afa6648ef8aa100d4a336fe921d9a)
1 // This file was automatically generated from flow.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleFlow12
3 
4 import kotlinx.coroutines.*
5 import kotlinx.coroutines.flow.*
6 
<lambda>null7 fun main() = runBlocking<Unit> {
8     (1..5).asFlow()
9         .filter {
10             println("Filter $it")
11             it % 2 == 0
12         }
13         .map {
14             println("Map $it")
15             "string $it"
16         }.collect {
17             println("Collect $it")
18         }
19 }
20