File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 6
6
7
7
C < List > stores items sequentially and potentially lazily.
8
8
9
+ Indexes into lists and arrays start at 0 by default.
10
+
9
11
= head2 Methods
10
12
11
13
= head3 elems
@@ -22,6 +24,34 @@ Returns the number of elements in the list
22
24
23
25
Returns the index of the last element
24
26
27
+ = head3 keys
28
+
29
+ multi sub keys(*@list) returns List:D
30
+ multi method keys(List:D:) returns List:D
31
+
32
+ Returns a list of indexes into the list
33
+
34
+ = head3 values
35
+
36
+ multi sub values(*@list) returns List:D
37
+ multi method values(List:D:) returns List:D
38
+
39
+ Returns a copy of the list.
40
+
41
+ = head3 kv
42
+
43
+ multi sub kv(*@list) returns List:D
44
+ multi method kv(List:D:) returns List:D
45
+
46
+ Returns a list of indexes and values interleaved. For example
47
+
48
+ <a b c>.kv
49
+
50
+ Returns
51
+
52
+ 0, 'a', 1, 'b', 2, 'c'
53
+
54
+
25
55
= head3 join
26
56
27
57
multi sub join(Str:D $separator, *@list) returns Str:D
You can’t perform that action at this time.
0 commit comments