|
|
|
|
|
by omouse
6416 days ago
|
|
"And you still maintain encapsulation, too, because the returned function may access stuff that was only available inside the containing closure (where it was dispatched)." That only works if your functions can maintain state and if they can, well they're basically objects aren't they... |
|
As for state information, you could just put a 'let' inside there with your variables, and call mutators on them from inside the "object"'s functions.
Hmm, I think all these Scheme-centric classes I've taken have warped my mind. I should seek therapy.