Function object: Difference between revisions

Content deleted Content added
Maintaining state: Add an example with a C++14 lambda
m In Python: modern Python 3
Line 642:
 
<syntaxhighlight lang="python">
class Accumulator(object):
def __init__(self, n) -> None:
self.n = n