Silly question, why I can use `ReceivingChannel` i...
# coroutines
d
Silly question, why I can use
ReceivingChannel
in a
for
loop? Is it an iterable? I don't see anything on its hierarchy
l
@dh44t Yes, it has the
iterator()
operator that returns a
ChannelIterator
which enables for loop usage. The
forEach
equivalent for ReceiveChannels is
consumeEach
FYI.
👍 1
d
Yes, I realise that I can't use
forEach
with was a bit of a shock
d
In 0.19.3 they added tons of extension functions similar to collections...