Hi. Probably I don't understand deep enough, but I...
# coroutines
a
Hi. Probably I don't understand deep enough, but I'm trying to create a a lazy sequence from jdbc call using buildSequence. I'm doing it like this:
Copy code
buildSequence {
    jdbc.query(sql, parmerters, { rs, _ ->
        yield( foo(rs) )
    })
}
but the compiler complaints about that yield, it is out of coroutine body. Outside of lambda it works. I'm interesting what is happening here and can I work it around somehow?