Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
reduction meta ops need another [] layer for sub refs
  • Loading branch information
gfldex committed Jun 29, 2016
1 parent 9256c86 commit 12b7637
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/Language/operators.pod
Expand Up @@ -296,11 +296,12 @@ to destructure a List of Lists.
=head1 Reduction Operators
Reduction operators apply any infix operator, surrounded by C<[> and C<]>,
element by element and return the resulting value.
element by element and return the resulting value. To use a function reference
provide an additional layer of C<[> and C<]>.
say [+] 1, 2, 3; # 6
sub plus { $^a + $^b };
say [&plus] 1, 2, 3; # 6
say [[&plus]] 1, 2, 3; # 6
They can be defined as a list prefix operators or will be generated automatically.
Expand Down

0 comments on commit 12b7637

Please sign in to comment.