Skip to content

Commit b431353

Browse files
committed
Working on hyper operators
Addressing #562, which was actually not a big deal; those operators are already indexed in every of their possible forms. However, I have rephrased a bit some descriptions, and anyway closes #562.
1 parent bc6130b commit b431353

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

doc/Language/operators.pod6

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,24 +279,21 @@ with C<R>. Associativity of operands is reversed as well.
279279
=head1 X<<<Hyper Operators|hyper,<<;hyper,>>;hyper,«;hyper,»>>>
280280
281281
Hyper Operators include C<«> and C<»>, with their ASCII variants C«<<»
282-
and C«>>».
283-
284-
Hyper operators apply a given operator enclosed by C<«> and C<»> to one or two
285-
lists, returning the resulting list. The pointy part of C<«> or C<»> has to
286-
point to the shorter list. A list with just one element is fine too. If one of
282+
and C«>>». They apply a given operator enclosed by C<«> and C<»> to one or two
283+
lists, returning the resulting list, with the pointy part of C<«> or C<»> aimed at the shorter list. Single elements are turned to a list, so they can be used too. If one of
287284
the lists is shorter than the other, the operator will cycle over the shorter
288285
list until all elements of the longer list are processed.
289286
290287
say (1, 2, 3) »*» 2; # OUTPUT: «(2 4 6)␤»
291288
say (1, 2, 3, 4) »~» <a b>; # OUTPUT: «(1a 2b 3a 4b)␤»
292289
say (1, 2, 3) »+« (4, 5, 6); # OUTPUT: «(5 7 9)␤»
293290
294-
Assignment meta operators can be hyped.
291+
Assignment meta operators can be I<hyped>.
295292
296293
my @a = 1, 2, 3;
297294
say @a »+=» 1; # OUTPUT: «[2 3 4]␤»
298295
299-
Hyper forms of unary operators have the pointy bit point to the operator and
296+
Hyper forms of unary operators have the pointy bit aimed at the operator and
300297
the blunt end at the list to be operated on.
301298
302299
my @wisdom = True, False, True;

0 commit comments

Comments
 (0)