1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 00:59:31 +00:00

Fix scoping with mutable variables

This commit is contained in:
Étienne Fildadut 2021-12-12 15:38:27 +01:00
parent 16d0bb8d7a
commit bb45cc8fdd
16 changed files with 1243 additions and 38 deletions

View file

@ -0,0 +1,42 @@
:x = [99]
:l = [1,x]
:n = 0
$ f(t)
~ t!insert(len(l)+1)
f1: {l} {t}
CHECK
§ c
~ n < 1
REC
~ n += 1
~ f(t)
END REC
~ x!insert(12)
f2: {l}
CHECK 2
§ d
~ t!insert(len(t)+1)
~ t(2)!insert(len(l)+1)
f3: {l} {t}
~ f(l)
FINAL
l: {l}
x: {x}