Now try writing something like this:
val records = myDb.getRecord()
// check something
if (somethingIsNotRight) return someResult
record.consumeEach { ... }
See what happens. If you want to just straight to the answer, read Cold flows, hot channels.
Now try writing something like this:
val records = myDb.getRecord()
// check something
if (somethingIsNotRight) return someResult
record.consumeEach { ... }
See what happens. If you want to just straight to the answer, read Cold flows, hot channels.
Project Lead for the Kotlin Programming Language @JetBrains