maybe this is actually better ``` suspend fun &lt...
# coroutines
j
maybe this is actually better
Copy code
suspend fun <V> receive(channels : List<ReceiveChannel<V>>) : Pair<ReceiveChannel<V>, V> {
  return select {
    channels.forEach { channel ->
      channel.onReceive { value -> Pair(channel, value) }
    }
  }
}