summaryrefslogtreecommitdiff
path: root/test.pez
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-10-13 12:02:04 +0200
committerlemon <lsof@mailbox.org>2022-10-13 12:02:04 +0200
commit6b962b57336266785352637579e24317b4ce3c97 (patch)
tree3a46bf1bd09102ee998bae57a77a417d47970a6f /test.pez
parente712e8fdce6b6fec0d647f8b645ca943a6c830d0 (diff)
length -> len
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]]]