WebGlossary.info
Generator function
- A function that can be exited and later re-entered, and that can therefore be used to generate a sequence of results instead of a single result. The context of a generator function (variable bindings) is saved across re-entrances. Generators are particularly useful for asynchronous programming as they mitigate problems with callbacks, such as “callback hell” and Inversion of Control (IoC). ← MDN Web Docs
- Previous term: Generator
- Next term: Generic programming
- Random term: DLR