Skip to content

Commit d1e3098

Browse files
committed
[operators] add "is assoc" trait for operators that are not left-associative
1 parent 5951b2a commit d1e3098

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/operators.pod

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ For unaries this is interpreted as:
7272
7373
=end table
7474
75+
In the operator descriptions below, a default associativity of I<left>
76+
is assumed.
7577
7678
=head1 Operator classification
7779
@@ -131,7 +133,7 @@ Technically this is not an operator, but syntax special-cased in the compiler.
131133
132134
=head2 prefix ++
133135
134-
multi sub prefix:<++>($x is rw)
136+
multi sub prefix:<++>($x is rw) is assoc<none>
135137
136138
Increments its argument by one, and returns the incremented value.
137139
@@ -145,7 +147,7 @@ semantics.
145147
146148
=head2 prefix --
147149
148-
multi sub prefix:<-->($x is rw)
150+
multi sub prefix:<-->($x is rw) is assoc<none>
149151
150152
Decrements its argument by one, and returns the decremented value.
151153
@@ -160,7 +162,7 @@ semantics.
160162
161163
=head2 postfix ++
162164
163-
multi sub postfix:<++>($x is rw)
165+
multi sub postfix:<++>($x is rw) is assoc<none>
164166
165167
Increments its argument by one, and returns the unincremented value.
166168
@@ -181,7 +183,7 @@ undefined values, it returns 0:
181183
182184
=head2 postfix --
183185
184-
multi sub postfix:<-->($x is rw)
186+
multi sub postfix:<-->($x is rw) is assoc<none>
185187
186188
Decrements its argument by one, and returns the undecremented value.
187189
@@ -204,7 +206,7 @@ undefined values, it returns 0:
204206
205207
=head2 infix **
206208
207-
multi sub infix:<**>(Any, Any) returns Numeric:D
209+
multi sub infix:<**>(Any, Any) returns Numeric:D is assoc<right>
208210
209211
The exponentiation operator coerces both arguments to L<Numeric>
210212
and calculates the left-hand-side raised to the power of the right-hand side.
@@ -458,7 +460,7 @@ Coerces both arguments to L<Str> and concatenates them.
458460
459461
=head2 infix &
460462
461-
multi sub infix:<&>($a, $b) returns Junction:D
463+
multi sub infix:<&>($a, $b) returns Junction:D is assoc<list>
462464
463465
Creates an I<all> L<Junction> from its arguments. See L<Junction> for more
464466
details.
@@ -467,14 +469,14 @@ details.
467469
468470
=head2 infix |
469471
470-
multi sub infix:<|>($a, $b) returns Junction:D
472+
multi sub infix:<|>($a, $b) returns Junction:D is assoc<list>
471473
472474
Creates an I<any> L<Junction> from its arguments. See L<Junction> for more
473475
details.
474476
475477
=head2 infix ^
476478
477-
multi sub infix:<^>($a, $b) returns Junction:D
479+
multi sub infix:<^>($a, $b) returns Junction:D is assoc<list>
478480
479481
Creates a I<one> L<Junction> from its arguments. See L<Junction> for more
480482
details.

0 commit comments

Comments
 (0)