All three generator methods do the same basic thing: they resume the
generator with a completion and return the next-yielded-value (or the
return value, if done is true). The only difference is which type of
completion is used to resume the generator: normal, throw, or return.
OK. I see
All three generator methods do the same basic thing: they resume the
generator with a completion and return the next-yielded-value (or the
return value, if done is true). The only difference is which type of
completion is used to resume the generator: normal, throw, or return.
On Wed, Feb 25,
On 25 Feb 2015, at 15:33, Kevin Smith zenpars...@gmail.com wrote:
OK. I see the use case for `throw()` (e.g. to convert a promise rejection
into an exception when using generators for async). The only use case for
`return()` is closing an iterator, then(?)
Or for closing a data sink, if
On Wed, Feb 25, 2015 at 2:39 PM, Bergi a.d.be...@web.de wrote:
Axel Rauschmayer schrieb:
OK. I see the use case for `throw()` (e.g. to convert a promise rejection
into an exception when using generators for async). The only use case for
`return()` is closing an iterator, then(?)
If you
Axel Rauschmayer schrieb:
OK. I see the use case for `throw()` (e.g. to convert a promise rejection into
an exception when using generators for async). The only use case for `return()`
is closing an iterator, then(?)
If you are using generators for async, then you'd call `return()` when
5 matches
Mail list logo