Skip to content

Commit

Permalink
Format corrections and reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jan 31, 2019
1 parent 45d8c16 commit 1a5cb9f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions doc/Language/operators.pod6
Expand Up @@ -2384,11 +2384,13 @@ Interleaves the lists passed to C<Z> like a zipper, stopping as soon as the
first input list is exhausted. The returned C<Seq> contains a nested list with
values for all C<Z> operators in a chain.
say (1, 2 Z <a b c> Z <+ ->).perl; # OUTPUT: «((1, "a", "+"), (2, "b", "-")).Seq␤»
for <a b c> Z <1 2 3> -> [$l, $r] {
say "$l:$r"
}
# OUTPUT: «a:1␤b:2␤c:3␤»
=for code
say (1, 2 Z <a b c> Z <+ ->).perl;
# OUTPUT: «((1, "a", "+"), (2, "b", "-")).Seq␤»
for <a b c> Z <1 2 3> -> [$l, $r] {
say "$l:$r"
}
# OUTPUT: «a:1␤b:2␤c:3␤»
The C<Z> operator also exists as a metaoperator, in which case the inner
lists are replaced by the value from applying the operator to the
Expand All @@ -2404,6 +2406,7 @@ X<|cross product operator>
Creates a cross product from all the lists, ordered so that the
rightmost elements vary most rapidly:
1..3 X <a b c> X 9
# produces ((1 a 9) (1 b 9) (1 c 9)
# (2 a 9) (2 b 9) (2 c 9)
Expand Down Expand Up @@ -2432,11 +2435,10 @@ whose elements are only produced on demand), an expression which will
end the sequence when C<True>, or other elements such as
L<Junctions|/type/Junction>.
The sequence operator invokes the generator with as many arguments as
necessary. The arguments are taken from the initial elements and the
already generated elements. The default generator is
C<*.>L<succ|/routine/succ> or C<*.>L<pred|/routine/pred>, depending on how the
end points compare:
The sequence operator invokes the generator with as many arguments as necessary.
The arguments are taken from the initial elements and the already generated
elements. The default generator is C<*.>L<succ|/routine/succ> or
C<*.>L<pred|/routine/pred>, depending on how the end points compare:
say 1 ... 4; # OUTPUT: «(1 2 3 4)␤»
say 4 ... 1; # OUTPUT: «(4 3 2 1)␤»
Expand Down

0 comments on commit 1a5cb9f

Please sign in to comment.