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 255547e commit ba981d4Copy full SHA for ba981d4
examples/eachk.janet
@@ -1,11 +1,11 @@
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 " "))
+(eachk i [:a :b :c :d :e] (prin i " "))
4
5
6
-(eachk i @[1 2 3 4 5] (prin i " "))
+(eachk i @["a" "b" "c" "d" "e"] (prin i " "))
7
8
-# keys table/struct, but maybe not in order
+# prints keys in table/struct in an unspecified order
9
# prints :b :a
10
(eachk k {:a 1 :b 2} (prinf "%v " k))
11
0 commit comments