3 ms·
Define a set of functions that close over their lexical environment, then treat the closed-over variables as internal/private state, and treat those functions a
by cstrahan 8y ago
Define a set of functions that close over their lexical environment, then treat the closed-over variables as internal/private state, and treat those functions as you would methods in OOP (reading/mutating the aforementioned variables).
- lispm 8y agoThat's basically the same level of OOP compared to how one can implement numbers and numeric operations as functions.