Skip to content

Commit

Permalink
[operators] add "is assoc" trait for operators that are not left-asso…
Browse files Browse the repository at this point in the history
…ciative
  • Loading branch information
moritz committed Aug 11, 2012
1 parent 5951b2a commit d1e3098
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/operators.pod
Expand Up @@ -72,6 +72,8 @@ For unaries this is interpreted as:
=end table
In the operator descriptions below, a default associativity of I<left>
is assumed.
=head1 Operator classification
Expand Down Expand Up @@ -131,7 +133,7 @@ Technically this is not an operator, but syntax special-cased in the compiler.
=head2 prefix ++
multi sub prefix:<++>($x is rw)
multi sub prefix:<++>($x is rw) is assoc<none>
Increments its argument by one, and returns the incremented value.
Expand All @@ -145,7 +147,7 @@ semantics.
=head2 prefix --
multi sub prefix:<-->($x is rw)
multi sub prefix:<-->($x is rw) is assoc<none>
Decrements its argument by one, and returns the decremented value.
Expand All @@ -160,7 +162,7 @@ semantics.
=head2 postfix ++
multi sub postfix:<++>($x is rw)
multi sub postfix:<++>($x is rw) is assoc<none>
Increments its argument by one, and returns the unincremented value.
Expand All @@ -181,7 +183,7 @@ undefined values, it returns 0:
=head2 postfix --
multi sub postfix:<-->($x is rw)
multi sub postfix:<-->($x is rw) is assoc<none>
Decrements its argument by one, and returns the undecremented value.
Expand All @@ -204,7 +206,7 @@ undefined values, it returns 0:
=head2 infix **
multi sub infix:<**>(Any, Any) returns Numeric:D
multi sub infix:<**>(Any, Any) returns Numeric:D is assoc<right>
The exponentiation operator coerces both arguments to L<Numeric>
and calculates the left-hand-side raised to the power of the right-hand side.
Expand Down Expand Up @@ -458,7 +460,7 @@ Coerces both arguments to L<Str> and concatenates them.
=head2 infix &
multi sub infix:<&>($a, $b) returns Junction:D
multi sub infix:<&>($a, $b) returns Junction:D is assoc<list>
Creates an I<all> L<Junction> from its arguments. See L<Junction> for more
details.
Expand All @@ -467,14 +469,14 @@ details.
=head2 infix |
multi sub infix:<|>($a, $b) returns Junction:D
multi sub infix:<|>($a, $b) returns Junction:D is assoc<list>
Creates an I<any> L<Junction> from its arguments. See L<Junction> for more
details.
=head2 infix ^
multi sub infix:<^>($a, $b) returns Junction:D
multi sub infix:<^>($a, $b) returns Junction:D is assoc<list>
Creates a I<one> L<Junction> from its arguments. See L<Junction> for more
details.
Expand Down

0 comments on commit d1e3098

Please sign in to comment.