Skip to content

Commit 3884abb

Browse files
author
Jan-Olof Hendig
committed
Added a few missing say statements to the examples
1 parent 68e8cc4 commit 3884abb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/Language/syntax.pod6

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,8 @@ non-string keys, use a colon prefix:
481481
482482
Note that with objects as keys, you cannot access non-string keys as strings:
483483
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␤»
486486
487487
=head3 Regex literals
488488
@@ -631,13 +631,13 @@ operator.
631631
Wrap an infix operator in C<[ ]> to create a new reduction operator that works
632632
on a single list of inputs, resulting in a single value.
633633
634-
[+] <1 2 3 4 5>; # OUTPUT: «15␤»
634+
say [+] <1 2 3 4 5>; # OUTPUT: «15␤»
635635
(((1 + 2) + 3) + 4) + 5 # equivalent expanded version
636636
637637
Wrap an infix operator in C<« »> (or the ASCII equivalent C<<< >>>) to create a
638638
new hyper operator that works pairwise on two lists.
639639
640-
<1 2 3> «+» <4 5 6> # OUTPUT: «<5 7 9>␤»
640+
say <1 2 3> «+» <4 5 6> # OUTPUT: «(5 7 9)␤»
641641
642642
The direction of the arrows indicates what to do when the lists are not the same size.
643643
@@ -650,6 +650,6 @@ The direction of the arrows indicates what to do when the lists are not the same
650650
651651
You can also wrap a unary operator with a hyper operator.
652652
653-
-« <1 2 3> # OUTPUT: «<-1 -2 -3>␤»
653+
say -« <1 2 3> # OUTPUT: «(-1 -2 -3)␤»
654654
655655
=end pod

0 commit comments

Comments
 (0)