@@ -2384,11 +2384,13 @@ Interleaves the lists passed to C<Z> like a zipper, stopping as soon as the
2384
2384
first input list is exhausted. The returned C < Seq > contains a nested list with
2385
2385
values for all C < Z > operators in a chain.
2386
2386
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:1b:2c: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:1b:2c:3»
2392
2394
2393
2395
The C < Z > operator also exists as a metaoperator, in which case the inner
2394
2396
lists are replaced by the value from applying the operator to the
@@ -2404,6 +2406,7 @@ X<|cross product operator>
2404
2406
2405
2407
Creates a cross product from all the lists, ordered so that the
2406
2408
rightmost elements vary most rapidly:
2409
+
2407
2410
1..3 X <a b c> X 9
2408
2411
# produces ((1 a 9) (1 b 9) (1 c 9)
2409
2412
# (2 a 9) (2 b 9) (2 c 9)
@@ -2432,11 +2435,10 @@ whose elements are only produced on demand), an expression which will
2432
2435
end the sequence when C < True > , or other elements such as
2433
2436
L < Junctions|/type/Junction > .
2434
2437
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:
2440
2442
2441
2443
say 1 ... 4; # OUTPUT: «(1 2 3 4)»
2442
2444
say 4 ... 1; # OUTPUT: «(4 3 2 1)»
0 commit comments