File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,15 @@ Returns
80
80
81
81
0, 'a', 1, 'b', 2, 'c'
82
82
83
+ = head3 pairs
84
+
85
+ multi sub pairs($list) returns List:D
86
+ multi method pairs(List:D:) returns List:D
87
+
88
+ Returns a list of pairs, with the indexes as keys and the list values as
89
+ values.
90
+
91
+ <a b c>.pairs # 0 => 'a', 1 => 'b', 2 => 'c'
83
92
84
93
= head3 join
85
94
@@ -229,5 +238,13 @@ generated that way.
229
238
Note that C < reduce > is an implicit loop, and thus responds to C < next > , C < last >
230
239
and C < redo > statements.
231
240
241
+ = head3 splice
242
+
243
+ multi sub splice(@list, $start, $elems? *@replacement) returns List:D
244
+ multi method splice(List:D: $start, $elems? *@replacement) returns List:D
245
+
246
+ Deletes C < $elems > elements starting from index C < $start > from the list,
247
+ returns them and replaces them by C < @replacement > . If C < $elems > is omitted,
248
+ all the elements starting from index C < $start > are deleted.
232
249
233
250
= end pod
You can’t perform that action at this time.
0 commit comments