We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3c81fce + a84a0fc commit f849f73Copy full SHA for f849f73
examples/map.janet
@@ -0,0 +1,9 @@
1
+# inc is applied to every value of the input data structure
2
+(map inc [7 8 9]) # -> @[8 9 10]
3
+
4
+# multiple data structures can be handled
5
+(map array [:x :y] [-1 1]) # -> @[@[:x -1] @[:y 1]]
6
7
+# result array has length of the shortest input data structure
8
+(map |(pos? (+ ;$&)) [1 2 3] [-1 -2 -3] [0 1]) # -> @[false true]
9
0 commit comments