summaryrefslogtreecommitdiff
path: root/test.pez
diff options
context:
space:
mode:
Diffstat (limited to 'test.pez')
-rw-r--r--test.pez9
1 files changed, 9 insertions, 0 deletions
diff --git a/test.pez b/test.pez
index eb98d75..b6dcd8c 100644
--- a/test.pez
+++ b/test.pez
@@ -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]]