@@ -481,8 +481,8 @@ non-string keys, use a colon prefix:
481
481
482
482
Note that with objects as keys, you cannot access non-string keys as strings:
483
483
484
- :{ -1 => 41, 0 => 42, 1 => 43 }<0>; # OUTPUT: «Any»
485
- :{ -1 => 41, 0 => 42, 1 => 43 }{0}; # OUTPUT: «42»
484
+ say :{ -1 => 41, 0 => 42, 1 => 43 }<0>; # OUTPUT: «( Any) »
485
+ say :{ -1 => 41, 0 => 42, 1 => 43 }{0}; # OUTPUT: «42»
486
486
487
487
= head3 Regex literals
488
488
@@ -631,13 +631,13 @@ operator.
631
631
Wrap an infix operator in C < [ ] > to create a new reduction operator that works
632
632
on a single list of inputs, resulting in a single value.
633
633
634
- [+] <1 2 3 4 5>; # OUTPUT: «15»
634
+ say [+] <1 2 3 4 5>; # OUTPUT: «15»
635
635
(((1 + 2) + 3) + 4) + 5 # equivalent expanded version
636
636
637
637
Wrap an infix operator in C < « » > (or the ASCII equivalent C <<< >>> ) to create a
638
638
new hyper operator that works pairwise on two lists.
639
639
640
- <1 2 3> «+» <4 5 6> # OUTPUT: «< 5 7 9> »
640
+ say <1 2 3> «+» <4 5 6> # OUTPUT: «( 5 7 9) »
641
641
642
642
The direction of the arrows indicates what to do when the lists are not the same size.
643
643
@@ -650,6 +650,6 @@ The direction of the arrows indicates what to do when the lists are not the same
650
650
651
651
You can also wrap a unary operator with a hyper operator.
652
652
653
- -« <1 2 3> # OUTPUT: «< -1 -2 -3> »
653
+ say -« <1 2 3> # OUTPUT: «( -1 -2 -3) »
654
654
655
655
= end pod
0 commit comments