Skip to content

Commit 1a5cb9f

Browse files
committed
Format corrections and reflow
1 parent 45d8c16 commit 1a5cb9f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

doc/Language/operators.pod6

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,11 +2384,13 @@ Interleaves the lists passed to C<Z> like a zipper, stopping as soon as the
23842384
first input list is exhausted. The returned C<Seq> contains a nested list with
23852385
values for all C<Z> operators in a chain.
23862386
2387-
say (1, 2 Z <a b c> Z <+ ->).perl; # OUTPUT: «((1, "a", "+"), (2, "b", "-")).Seq␤»
2388-
for <a b c> Z <1 2 3> -> [$l, $r] {
2389-
say "$l:$r"
2390-
}
2391-
# OUTPUT: «a:1␤b:2␤c:3␤»
2387+
=for code
2388+
say (1, 2 Z <a b c> Z <+ ->).perl;
2389+
# OUTPUT: «((1, "a", "+"), (2, "b", "-")).Seq␤»
2390+
for <a b c> Z <1 2 3> -> [$l, $r] {
2391+
say "$l:$r"
2392+
}
2393+
# OUTPUT: «a:1␤b:2␤c:3␤»
23922394
23932395
The C<Z> operator also exists as a metaoperator, in which case the inner
23942396
lists are replaced by the value from applying the operator to the
@@ -2404,6 +2406,7 @@ X<|cross product operator>
24042406
24052407
Creates a cross product from all the lists, ordered so that the
24062408
rightmost elements vary most rapidly:
2409+
24072410
1..3 X <a b c> X 9
24082411
# produces ((1 a 9) (1 b 9) (1 c 9)
24092412
# (2 a 9) (2 b 9) (2 c 9)
@@ -2432,11 +2435,10 @@ whose elements are only produced on demand), an expression which will
24322435
end the sequence when C<True>, or other elements such as
24332436
L<Junctions|/type/Junction>.
24342437
2435-
The sequence operator invokes the generator with as many arguments as
2436-
necessary. The arguments are taken from the initial elements and the
2437-
already generated elements. The default generator is
2438-
C<*.>L<succ|/routine/succ> or C<*.>L<pred|/routine/pred>, depending on how the
2439-
end points compare:
2438+
The sequence operator invokes the generator with as many arguments as necessary.
2439+
The arguments are taken from the initial elements and the already generated
2440+
elements. The default generator is C<*.>L<succ|/routine/succ> or
2441+
C<*.>L<pred|/routine/pred>, depending on how the end points compare:
24402442
24412443
say 1 ... 4; # OUTPUT: «(1 2 3 4)␤»
24422444
say 4 ... 1; # OUTPUT: «(4 3 2 1)␤»

0 commit comments

Comments
 (0)