1
I know that the iterator `g` will signal the value `done` after the first loop, but this behaviour was unexpected and really counterintuitive to me
Note: contrary to this example, for-of loops of arrays will work as I expected. It just doesn't make sense
Code example:
> function* gen() { yield* [1,2,3] }
undefined
> let g = gen()
undefined
> for (let el of g) console.log(el)
1
2
3
undefined
> for (let el of g) console.log(el)
undefined
edit: layout