``` val combineLatest = produce<Pair<Str...
# coroutines
d
Copy code
val combineLatest = produce<Pair<String, String>>(coroutineContext) {
        var item1 = channel1.receive()
        var item2 = channel2.receive()
        fun result() = item1 to item2
        send(result())

        while (isActive) {
            send(select {
                channel1.onReceive {
                    item1 = it
                    result()
                }
                channel2.onReceive {
                    item2 = it
                    result()
                }
            })
        }
    }
👍 1