collect

suspend fun <T, A : Any, R> ReceiveChannel<T>.collect(
    collector: Collector<T, A, R>
): R

Applies the collector to the ReceiveChannel