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 47a59ae..e4542d0 100644
--- a/test.pez
+++ b/test.pez
@@ -42,3 +42,12 @@ printf["4+1+3: %a\n", add[4,1,3]]
}
printf["test %a\n", gather[-1, (), 'x]]
+
+@map: {[f, xs]
+ @ys: array#filled[xs.len, ()]
+ FOR [@i: 0][< xs.len][+ 1]
+ ys[i] = f[xs[i]]
+ ys
+}
+
+printf["%a\n", map["abcd", #[1,2,0]]]