@@ -433,9 +433,9 @@ within the list, but keep the arguments more or less as-is:
433
433
my @array = <a b c>;
434
434
my $list := <d e f>;
435
435
sub b(**@b) { @b.perl.say };
436
- b(@array); # OUTPUT: «[["a", "b", "c"]]»
436
+ b(@array); # OUTPUT: «[["a", "b", "c"], ]»
437
437
b(1, $list, [2, 3]); # OUTPUT: «[1, ("d", "e", "f"), [2, 3]]»
438
- b([1, 2]); # OUTPUT: «[[1, 2]]»
438
+ b([1, 2]); # OUTPUT: «[[1, 2], ]»
439
439
b(1, [1, 2], ([3, 4], 5)); # OUTPUT: «[1, [1, 2], ([3, 4], 5)]»
440
440
b(($_ for 1, 2, 3)); # OUTPUT: «[(1, 2, 3),]»
441
441
@@ -504,9 +504,9 @@ as the parameters were declared.
504
504
In the case of named arguments and parameters, only the name is used for
505
505
mapping arguments to parameters
506
506
507
- = for code :allow<L>
508
- sub named(:$x, :$y) { "x=$x y=$y" }
509
- named( y => 5, x => 4); # RESULT: «x=4 y=5»
507
+ = for code :allow<L>
508
+ sub named(:$x, :$y) { "x=$x y=$y" }
509
+ named( y => 5, x => 4); # RESULT: «x=4 y=5»
510
510
511
511
It is possible to have a different name for a named parameter than the
512
512
variable name:
0 commit comments