Skip to content

Commit

Permalink
Update and clarify description of reduce on ops beginning with backslash
Browse files Browse the repository at this point in the history
infix:<\x> was wrongly stated to completely mask triangle reduce with
infix:<x>, but we now have the [\[x]] syntax for disambiguation.
  • Loading branch information
Mouq committed Mar 25, 2015
1 parent 74e3d75 commit c25d86e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions S03-operators.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4755,10 +4755,11 @@ list of lists, you can use a "triangular comma":
If there is ambiguity between a triangular reduce and an infix operator
beginning with backslash, the infix operator is chosen, and an extra backslash
indicates the corresponding triangular reduce. As a consequence, defining an
infix operator beginning with backslash, C<< infix:<\x> >> say, will make it
impossible to write certain triangular reduction operators, since C<[\x]> would
mean the normal reduction of C<< infix:<\x> >> operator, not the triangular
reduction of C<< infix:<x> >>. This is deemed to be an insignificant problem.
infix operator beginning with backslash, C<< infix:<\x> >> say, would cause
C<[\x]> to mean the normal reduction of C<< infix:<\x> >>, not the triangular
reduction of C<< infix:<x> >>. To disambiguate, the syntax C<[\[x]]> can be
used to reduce with C<< infix:<x> >>, while C<[\\x]> or C<[\[\x]]> could be
used for triangular reduce with C<< infix:<\x> >>.

Triangular reductions of chaining operators always consist of one or
more C<True> values followed by 0 or more C<False> values.
Expand Down

0 comments on commit c25d86e

Please sign in to comment.