Jump to content

Accumulator factory: Difference between revisions

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|any Smalltalk}}
<lang smalltalk>|factory accu1 accu2|
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.