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

26 lines
204 B
Text
Raw Normal View History

2022-10-30 22:07:53 +00:00
===== script =====
2021-12-10 20:22:16 +00:00
counter = {
i = 0
2022-10-30 22:07:53 +00:00
{ i = + i 1 }
2021-12-10 20:22:16 +00:00
}
c1 = (counter)
c2 = (counter)
print (c1)
print (c2)
print (c1)
print (c2)
print (c2)
print (c1)
print (c2)
2022-10-30 22:07:53 +00:00
===== output =====
2021-12-10 20:22:16 +00:00
1
1
2
2
3
3
4