Anonymous user
Accumulator factory: Difference between revisions
→{{header|Smalltalk}}
Line 3,291:
the above can also be done without a class to hold the block, simply by putting it into another block (i.e. an outer closure for the sum, returning an inner function which updates that sum):
{{works with|
<lang smalltalk>|factory accu1 accu2|
|