Skip to content

Commit ee5c39e

Browse files
committed
doc Sequential Operators and Zip Operators
1 parent 386ea0d commit ee5c39e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

doc/Language/operators.pod

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,23 @@ quote it with C<[]> (e.g. C<[\[\x]]>).
254254
TODO
255255
256256
=head2 Zip Operators
257-
TODO
257+
258+
The zip metaoperator, C<Z>, will apply a given infix operator to pairs taken
259+
one left, one right, from it's arguments. The resulting list is returned.
260+
261+
my @l = <a b c> Z~ 1,2,3; # [a1 b2 c3]
262+
263+
If one of the operands runs out of elements prematurely, the zip operator will
264+
stop. An infinite list can be used to repeat elements.
265+
266+
my @l = <a b c d> Z~ ':' xx *; [a: b: c: d:]
258267
259268
=head2 Sequential Operators
260-
TODO
269+
270+
The sequential metaoperator, C<S>, will suppress any concurrency, or reordering
271+
done by the optimizer. Most simple infix operators are supported.
272+
273+
say so 1 S& 2 S& 3; # True
261274
262275
=head2 Nesting of Meta Operators
263276
TODO

0 commit comments

Comments
 (0)