louiscad
07/05/2018, 8:17 AMonEach
function for ReceiveChannel
?spand
07/05/2018, 8:57 AMfor (msg in channel) {
msg.stuff()
}
louiscad
07/05/2018, 9:09 AMfilter
and other operations. I saw it would not be enough to satisfy my use case anyway, so I went with a simple consumeEach
and additional collections for blacklisting part of the elementswithoutclass
07/05/2018, 2:56 PMconsumeEach
since it will close the channel if the coroutine you’re reading from exits/is canceledonEach
may be composability, for instance you’d probably need it at the start of the chain, because it’ll end up being something like iterating on the channel, doing some action, then returning the item