[Aahz] > Huh. Do other people agree that generators are a form of closures? Closure = chunk o' code + lexical environmemt, so sure, but it's not a *useful* characterization because generators also capture a program counter, local bindings, and the internal eval stack. "Resumable function" is still (I believe) the easiest way for a non-Scheme-head to think abou them. "Closure" only covers the "function" part; it's the "resumable" part that makes a generator more than just another function.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4