Skip to content

Commit 9055ed1

Browse files
authored
eliminate superstitious parentheses in operators.rakudoc (#4706)
eliminate superstitious parentheses in code example in the doco of the feed operator
1 parent 61e80a0 commit 9055ed1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/Language/operators.rakudoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3554,17 +3554,17 @@ operands are false, returns the last one.
35543554
This X<feed|Infix operators,feed> operator takes the result from the left and passes it to the
35553555
next (right) routine as the last parameter.
35563556

3557-
my @array = (1, 2, 3, 4, 5);
3557+
my @array = 1, 2, 3, 4, 5;
35583558
@array ==> sum() ==> say(); # OUTPUT: «15␤»
35593559

35603560
This simple example, above, is the equivalent of writing:
35613561

3562-
my @array = (1, 2, 3, 4, 5);
3562+
my @array = 1, 2, 3, 4, 5;
35633563
say(sum(@array)); # OUTPUT: «15␤»
35643564

35653565
Or if using methods:
35663566

3567-
my @array = (1, 2, 3, 4, 5);
3567+
my @array = 1, 2, 3, 4, 5;
35683568
@array.sum.say; # OUTPUT: «15␤»
35693569

35703570
The precedence is very loose so you will need to use parentheses to

0 commit comments

Comments
 (0)