diff options
| author | 2022-10-10 16:18:02 +0200 | |
|---|---|---|
| committer | 2022-10-10 16:18:02 +0200 | |
| commit | 77dd89282880373645769101c6f795a9a5ce6ff3 (patch) | |
| tree | a1ddd7638643fdbee9ea07f60d804ca886907b6a /test.pez | |
| parent | 113ca8ba774006c1d24bc399dd42756cc3239bf6 (diff) | |
varargs
Diffstat (limited to 'test.pez')
| -rw-r--r-- | test.pez | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -26,3 +26,12 @@ FOR [@x: 0][< 10][+ 1] m[x, y] = x ^ y printf["%a == %a\n", m[3,7], 3^7] + +@add: {[*] + @acc = 0 + FOR [@i: 0][< SEL$][+ 1] + acc += SEL[i] + acc +} + +printf["4+1+3: %a\n", add[4,1,3]] |