mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
Add for loops
This commit is contained in:
parent
a212dd7fd1
commit
efb99a9ed7
28 changed files with 284 additions and 21 deletions
7
test/tests/for struct.ans
Normal file
7
test/tests/for struct.ans
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
:s = { "a":"b", 6:"c", 98:5, true:3 }
|
||||
:t = *s
|
||||
|
||||
/* 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)
|
||||
|{t!has(k)}|
|
||||
t(k) = ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue