|
|
|
|
|
by randomguy1254
3548 days ago
|
|
Closures are functions that can capture values/references visible in the scope where the function is defined/instantiated. They are basically a short hand way of creating function objects, functions which have data members. |
|
Classes themselves can hold multiple functions/methods, and if you want a function that carries state, maybe a generator would be useful?