Skip to content

Commit 072cf61

Browse files
Salve J. Nilsensjn
authored andcommitted
Improve ff() examples
- Add an element to the beginning and end of the arrays used in the ff() (and related) examples. This is to also show the main feature of ff() when the read looks for specific usage examples.
1 parent 7fb2ecb commit 072cf61

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/Language/operators.rakudoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,7 +2859,7 @@ condition).
28592859

28602860
A comparison:
28612861

2862-
my @list = <A B C>;
2862+
my @list = <X A B C Y>;
28632863
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
28642864
say $_ if /A/ ^ff /C/ for @list; # OUTPUT: «B␤C␤»
28652865

@@ -2874,7 +2874,7 @@ This operator cannot be overloaded, as it's handled specially by the compiler.
28742874
Works like L<ff|/routine/ff>, except it does not return C<True> for items matching the
28752875
stop condition (including items that first matched the start condition).
28762876

2877-
my @list = <A B C>;
2877+
my @list = <X A B C Y>;
28782878
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
28792879
say $_ if /A/ ff^ /C/ for @list; # OUTPUT: «A␤B␤»
28802880

@@ -2889,7 +2889,7 @@ This operator cannot be overloaded, as it's handled specially by the compiler.
28892889
Works like L<ff|/routine/ff>, except it does not return C<True> for items matching either
28902890
the stop or start condition (or both).
28912891

2892-
my @list = <A B C>;
2892+
my @list = <X A B C Y>;
28932893
say $_ if /A/ ff /C/ for @list; # OUTPUT: «A␤B␤C␤»
28942894
say $_ if /A/ ^ff^ /C/ for @list; # OUTPUT: «B␤»
28952895

@@ -2925,7 +2925,7 @@ This operator cannot be overloaded, as it's handled specially by the compiler.
29252925

29262926
Like L<fff|/routine/fff>, except it does not return true for matches to the left argument.
29272927

2928-
my @list = <A B C>;
2928+
my @list = <X A B C Y>;
29292929
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
29302930
say $_ if /A/ ^fff /C/ for @list; # OUTPUT: «B␤C␤»
29312931

@@ -2940,7 +2940,7 @@ This operator cannot be overloaded, as it's handled specially by the compiler.
29402940
Like L<fff|/routine/fff>, except it does not return true for matches to the right
29412941
argument.
29422942

2943-
my @list = <A B C>;
2943+
my @list = <X A B C Y>;
29442944
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
29452945
say $_ if /A/ fff^ /C/ for @list; # OUTPUT: «A␤B␤»
29462946

@@ -2955,7 +2955,7 @@ This operator cannot be overloaded, as it's handled specially by the compiler.
29552955
Like L<fff|/routine/fff>, except it does not return true for matches to either the left or
29562956
right argument.
29572957

2958-
my @list = <A B C>;
2958+
my @list = <X A B C Y>;
29592959
say $_ if /A/ fff /C/ for @list; # OUTPUT: «A␤B␤C␤»
29602960
say $_ if /A/ ^fff^ /C/ for @list; # OUTPUT: «B␤»
29612961

0 commit comments

Comments
 (0)