pawel.barszcz
05/12/2017, 11:53 AMyield
with parameter whcih will be the next value of a sequence. Morever such yield
can return value provided in iterating code.
Something like this:
// in generator named `values`
x = yield(123)
// x is now "abc"
// and in other place in code
y = values.next("abc")
// y is now 123