Just like sequence builder is suspended while unti...
# coroutines
e
Just like sequence builder is suspended while until
next
invocation, the producer is suspended until somebody invokes
receive
. The one less important difference is that
produce
is slightly less lazy, because it first computes the value, then tries to send it (and may suspend), while with
buildSequence
it is never computed unless requested by
next
.