If I understand, correctly, `someGeneratorObject.return(v)` usually produces `{ 
value: v, done: true}`. The alternative would be that this method returns 
immediately (with `undefined`) and queues up that object to be returned by 
`next()`. That’s what would happen if the generator itself executed a `return` 
statement.

I don’t know which alternative makes more sense, but I’d love to find out more 
about the rationale behind this particular design decision.

Thanks!

Axel

-- 
Dr. Axel Rauschmayer
[email protected]
rauschma.de



_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to