Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2234 from mendel/mention-hyped-infix-assignment-o…
…ps-in-traps

mention hyped form of infix assignment ops in traps
  • Loading branch information
mendel committed Aug 1, 2018
2 parents e1642ee + 065c7c5 commit 9b1f8c3
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 9b1f8c3

Please sign in to comment.