Skip to content

Commit 4697053

Browse files
committed
Reindexes andthen, gets page back refs #2568
1 parent 1f75096 commit 4697053

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

doc/Language/operators.pod6

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
=SUBTITLE Common Perl 6 infixes, prefixes, postfixes, and more!
66
7-
See L<Sub|/type/Sub> on how to define operators.
7+
See L<Sub|/type/Sub> on how to define new operators.
88
99
=head1 Operator precedence
1010
@@ -2578,7 +2578,7 @@ are based on.
25782578
25792579
=head1 Loose AND precedence
25802580
2581-
=head2 infix C«and»
2581+
=head2 infix X<C«and»>
25822582
25832583
Same as L<infix &&|/language/operators#infix_%26%26>, except with looser
25842584
precedence.
@@ -2587,7 +2587,7 @@ Short-circuits so that it returns the first operand that evaluates to
25872587
C<False>, otherwise returns the last operand. Note that C<and> is easy
25882588
to misuse. See L<traps|/language/traps#Loose_boolean_operators>.
25892589
2590-
=head2 infix C«andthen» X<|andthen>
2590+
=head2 infix X<C«andthen»>
25912591
25922592
The C<andthen> operator returns
25932593
L«C<Empty>|/type/Slip#index-entry-Empty-Empty» upon encountering the
@@ -2628,21 +2628,24 @@ behaviour:
26282628
.say with 42;
26292629
42 andthen .say;
26302630
2631-
=head2 infix C«notandthen»
2631+
=head2 infix X<C«notandthen»>
26322632
2633-
The X<notandthen> operator returns L«C<Empty>|/type/Slip#index-entry-Empty-Empty» upon encountering
2634-
the first L<defined|/routine/defined> argument, otherwise the last argument.
2635-
Last argument is returned as-is, without being checked for definedness at all.
2636-
Short-circuits. The result of the left side is bound to C<$_> for the
2637-
right side, or passed as arguments if the right side is a
2638-
L«C<Callable>|/type/Callable», whose L<count|/routine/count> must be C<0> or C<1>.
2633+
The C<notandthen> operator returns
2634+
L«C<Empty>|/type/Slip#index-entry-Empty-Empty» upon encountering the first
2635+
L<defined|/routine/defined> argument, otherwise the last argument. Last argument
2636+
is returned as-is, without being checked for definedness at all. Short-circuits.
2637+
The result of the left side is bound to C<$_> for the right side, or passed as
2638+
arguments if the right side is a L«C<Callable>|/type/Callable», whose
2639+
L<count|/routine/count> must be C<0> or C<1>.
26392640
2640-
At first glance, L<notandthen|/routine/notandthen> might appear to be the same thing as the L<orelse|/routine/orelse>
2641-
operator. The difference is subtle: L<notandthen|/routine/notandthen> returns
2641+
At first glance, L<notandthen|/routine/notandthen> might appear to be the same
2642+
thing as the L<orelse|/routine/orelse> operator. The difference is subtle:
2643+
L<notandthen|/routine/notandthen> returns
26422644
L«C<Empty>|/type/Slip#index-entry-Empty-Empty» when it encounters a
2643-
L<defined|/routine/defined> item (that isn't the last item), whereas L<orelse|/routine/orelse> returns that
2644-
item. In other words, L<notandthen|/routine/notandthen> is a means to act when items aren't
2645-
defined, whereas L<orelse|/routine/orelse> is a means to obtain the first defined item:
2645+
L<defined|/routine/defined> item (that isn't the last item), whereas
2646+
L<orelse|/routine/orelse> returns that item. In other words,
2647+
L<notandthen|/routine/notandthen> is a means to act when items aren't defined,
2648+
whereas L<orelse|/routine/orelse> is a means to obtain the first defined item:
26462649
26472650
=begin code
26482651
sub all-sensors-down { [notandthen] |@_, True }

0 commit comments

Comments
 (0)