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

Add for loops

This commit is contained in:
Étienne Fildadut 2024-01-05 01:36:37 +01:00
parent a212dd7fd1
commit efb99a9ed7
28 changed files with 284 additions and 21 deletions

6
test/tests/for table.ans Normal file
View file

@ -0,0 +1,6 @@
:s = *{ "a":"b", 6:"c", 98:5, true:3 }
/* struct iteration is non deterministic, too lazy to sort, so we check if we have 4 key that each appear at most once */
for(:k, s)
|{s!has(k)}|
s(k) = ()