We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8aed1b1 commit 255547eCopy full SHA for 255547e
examples/eachk.janet
@@ -0,0 +1,13 @@
1
+# keys for tuple/array are 0-based index
2
+# prints 0 1 2 3 4
3
+(eachk i [1 2 3 4 5] (prin i " "))
4
+
5
6
+(eachk i @[1 2 3 4 5] (prin i " "))
7
8
+# keys table/struct, but maybe not in order
9
+# prints :b :a
10
+(eachk k {:a 1 :b 2} (prinf "%v " k))
11
12
+# prints :foo :bar
13
+(eachk k @{:foo "A" :bar "B"} (prinf "%v " k))
0 commit comments