Skip to content

Commit 0765d1d

Browse files
committed
better description and example for Z
1 parent a7716fc commit 0765d1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/Language/operators.pod6

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,9 @@ Interleaves the lists passed to C<Z> like a zipper, stopping as soon as
20112011
the first input list is exhausted:
20122012
20132013
say (1, 2 Z <a b c> Z <+ ->).perl; #=> ((1, "a", "+"), (2, "b", "-")).Seq
2014+
for <a b c> Z <1 2 3> -> $l, $r {
2015+
say "$l:$r"
2016+
}
20142017
20152018
The C<Z> operator also exists as a meta operator, in which case the inner
20162019
lists are replaced by the value from applying the meta'ed operator to the

0 commit comments

Comments
 (0)