Accumulator factory: Difference between revisions
m
→{{header|Quackery}}: more commentary
(Added Quackery.) |
m (→{{header|Quackery}}: more commentary) |
||
Line 2,933:
</pre>
The running total has been printed, and the updated accumulator function has remained on the stack. (Everything in Quackery is immutable ''except for'' ancillary stacks (created with <code>[ stack ]</code>), which Quackery has instead of variables. It is rare to embed an ancillary stack in a nest, but this is a good use case.)
Now let's create a second accumulator function with <code>factory</code> and confirm that the two accumulator functions behave independently of one another by <code>do</code>-ing first one of them, then the other.
|