Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention hyped form of infix assignment ops in traps
  • Loading branch information
mendel committed Aug 1, 2018
1 parent f544565 commit 065c7c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/Language/traps.pod6
Expand Up @@ -875,6 +875,12 @@ in mind that C<+=> isn't defined as method on the left hand argument
Here C<@a> is assigned the result of adding C<@a> (which has three elements)
and C<10>; C<13> is therefore placed in C<@a>.
Use the L<hyper form|https://docs.perl6.org/language/operators#Hyper_operators>
of the assignment operators instead:
my @a = 1, 2, 3;
@a »+=» 10;
say @a; # OUTPUT: «[11 12 13]␤»
=head1 Regexes
Expand Down

0 comments on commit 065c7c5

Please sign in to comment.