Skip to content

Commit a773299

Browse files
authored
Z metaoperator & infix:<Z>: clarify their relationship (#4714)
* Z metaoperator & infix:<Z>: explain more about their relation to one another Clarified the relationship between the Z metaoperator and the infix:<Z> operator * rm errant whitespace
1 parent 11c9274 commit a773299

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/Language/operators.rakudoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ quickly.
601601

602602
=head2 X<Zip metaoperator|Metaoperators,Z (zip metaoperator)>
603603

604-
The zip metaoperator (which is not the same thing as L<Z|#infix_Z>) will
604+
The zip metaoperator (not to be confused with L<infix:<Z>|#infix_Z>) will
605605
apply a given infix operator to pairs taken one left, one right, from its
606606
arguments. The resulting list is returned.
607607

@@ -619,6 +619,8 @@ default:
619619

620620
my @l = 1 Z 2; # OUTPUT: «[(1 2)]»
621621

622+
See L<infix:<Z>|#infix_Z> for more about this usage.
623+
622624
=head2 X<Sequential operators|Metaoperators,S;Metaoperators,sequential metaoperator>
623625

624626
The sequential metaoperator, C<S>, will suppress any concurrency or reordering
@@ -3117,13 +3119,16 @@ for <a b c> Z <1 2 3 4> -> [$l, $r] {
31173119
}
31183120
# OUTPUT: «a:1␤b:2␤c:3␤»
31193121

3120-
The C<Z> operator also exists as a metaoperator, in which case the inner
3121-
lists are replaced by the value from applying the operator to the
3122+
The C<Z> operator also exists as a L<metaoperator|/language/operators#Zip_metaoperator>,
3123+
in which case the inner lists are replaced by the value from applying the operator to the
31223124
list:
31233125

31243126
say 100, 200 Z+ 42, 23; # OUTPUT: «(142 223)␤»
31253127
say 1..3 Z~ <a b c> Z~ 'x' xx 3; # OUTPUT: «(1ax 2bx 3cx)␤»
31263128

3129+
C<infix:<Z>> is a shortcut for C<Z,>, which is the L<C<Z> metaoperator|/language/operators#Zip_metaoperator>
3130+
applied to the L<C<,> list-construction operator|/language/operators#infix_,>.
3131+
31273132
As any other infix operator, it can be used under its full name:
31283133

31293134
=for code

0 commit comments

Comments
 (0)