3 ms·
Not really in machine language or even BASIC (see below).
by Questron 9y ago
Not really in machine language or even BASIC (see below).
- int_19h 9y agoYour BASIC example doesn't have any local variables to close over. It just references a global. That defeats the whole point of closures. Passing or returning first-class functions aren't a problem. First-class closures (function pointer + state) are.
- Questron 9y agoYou can create closures in CBM BASIC V2 by referencing arrays or creating thunks as an extension. But that's beside the original point. Implementing is not a lot of work but since my mega-deriver already solves the problem (derivation) elegantly and efficiently (most likely more efficiently than the original m68k lisp program), I really don't see any reason to use closures here. Do you?