From 6b962b57336266785352637579e24317b4ce3c97 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 13 Oct 2022 12:02:04 +0200 Subject: length -> len --- test.pez | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test.pez') 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]]] -- cgit v1.2.3