Accumulator factory: Difference between revisions

Line 1,630:
"de-comment the previous line to show that x is a block closure"</lang>
 
the above can also be done without a class to hold the block, simply by putting it into another block.:
Its closure holds the state:
{{works with|Smalltalk/X}}
<lang smalltalk>|factory a|
Anonymous user