apfl/src/functional-tests/function-mutable-capture.at

25 lines
204 B
Text

===== script =====
counter = {
i = 0
{ i = + i 1 }
}
c1 = (counter)
c2 = (counter)
print (c1)
print (c2)
print (c1)
print (c2)
print (c2)
print (c1)
print (c2)
===== output =====
1
1
2
2
3
3
4