Skip to content

Commit 34c6f3c

Browse files
committed
meta-Z is no the same thing as Z, link there
1 parent 0765d1d commit 34c6f3c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

doc/Language/operators.pod6

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ quickly.
345345
346346
=head1 Zip Operators
347347
348-
The zip metaoperator, C<Z>, will apply a given infix operator to pairs taken
349-
one left, one right, from its arguments. The resulting list is returned.
348+
The zip metaoperator, (which is not the same thing as L<Z|#infix_Z>), will
349+
apply a given infix operator to pairs taken one left, one right, from its
350+
arguments. The resulting list is returned.
350351
351352
my @l = <a b c> Z~ 1, 2, 3; # [a1 b2 c3]
352353
@@ -2007,13 +2008,15 @@ sub infix:<Z>(**@lists) returns List:D is assoc<chain>
20072008
20082009
X<Zip operator>.
20092010
2010-
Interleaves the lists passed to C<Z> like a zipper, stopping as soon as
2011-
the first input list is exhausted:
2011+
Interleaves the lists passed to C<Z> like a zipper, stopping as soon as the
2012+
first input list is exhausted. The returned C<Seq> contains a nested list with
2013+
values for all C<Z> operators in a chain.
20122014
20132015
say (1, 2 Z <a b c> Z <+ ->).perl; #=> ((1, "a", "+"), (2, "b", "-")).Seq
20142016
for <a b c> Z <1 2 3> -> $l, $r {
20152017
say "$l:$r"
20162018
}
2019+
OUTPUT«a:1␤b:2␤c:3␤»
20172020
20182021
The C<Z> operator also exists as a meta operator, in which case the inner
20192022
lists are replaced by the value from applying the meta'ed operator to the

0 commit comments

Comments
 (0)