File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,9 @@ Fails for infinite lists.
343
343
344
344
Example:
345
345
346
- > my @foo = <a b c>; @foo.push: 1, 3 ... 11;
347
- a b c 1 3 5 7 9 11
346
+ my @foo = <a b c>;
347
+ @foo.push: 1, 3 ... 11;
348
+ say @foo; # a b c 1 3 5 7 9 11
348
349
349
350
= head2 shift
350
351
@@ -355,14 +356,10 @@ Removes and returns the first item from the list. Fails for an empty list.
355
356
356
357
Example:
357
358
358
- > my @foo = <a b>;
359
- a b
360
- > @foo.shift;
361
- a
362
- > @foo.shift;
363
- b
364
- > @foo.shift;
365
- Element shifted from empty list
359
+ my @foo = <a b>;
360
+ say @foo.shift; # a
361
+ say @foo.shift; # b
362
+ say @foo.shift; # Element shifted from empty list
366
363
367
364
= head2 unshift
368
365
@@ -374,7 +371,8 @@ Fails if C<@values> is infinite.
374
371
375
372
Example:
376
373
377
- > my @foo = <a b c>; @foo.unshift: 1, 3 ... 11;
378
- 1 3 5 7 9 11 a b c
374
+ my @foo = <a b c>;
375
+ @foo.unshift: 1, 3 ... 11;
376
+ say @foo; # 1 3 5 7 9 11 a b c
379
377
380
378
= end pod
You can’t perform that action at this time.
0 commit comments