in reply to OOP By Any Other Name
I believe it's called a closure. You've created a pair of functions which capture the counter variable. Then you can use those functions to modify the enclosed variable.
Update: Repaired the link.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|