blob: 9b2855ef09295986925c7d6c6c8d468529bd9003 [file] [log] [blame]
Roman Elizarov3258e1f2019-08-22 20:08:48 +03001/*
Roman Elizarov660c2d72020-02-14 13:18:37 +03002 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
Roman Elizarov3258e1f2019-08-22 20:08:48 +03003 */
4
Roman Elizarov660c2d72020-02-14 13:18:37 +03005// This file was automatically generated from flow.md by Knit tool. Do not edit.
6package kotlinx.coroutines.guide.exampleFlow31
Roman Elizarov3258e1f2019-08-22 20:08:48 +03007
8import kotlinx.coroutines.*
9import kotlinx.coroutines.flow.*
10
11fun foo(): Flow<Int> = (1..3).asFlow()
12
13fun main() = runBlocking<Unit> {
14 try {
15 foo().collect { value -> println(value) }
16 } finally {
17 println("Done")
18 }
19}