Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Uniforms capitalization refs #1945
  • Loading branch information
JJ committed Jul 10, 2018
1 parent e91c541 commit ef5badc
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions doc/Language/operators.pod6
Expand Up @@ -6,7 +6,7 @@
See L<Sub> on how to define operators.
=head1 Operator Precedence
=head1 Operator precedence
In an expression like C<1 + 2 * 3>, the C<2 * 3> is evaluated first
because the infix C<*> has tighter B<precedence> than the C<+>.
Expand Down Expand Up @@ -114,7 +114,7 @@ L<#prefix ...> etc. stub operators.
Defining custom operators is covered in
L<Defining Operators functions|/language/functions#Defining_Operators>.
L<Defining operators functions|/language/functions#Defining_Operators>.
=head1 Metaoperators
Expand All @@ -127,7 +127,7 @@ chained metaoperators, enclose the inner operator in square brackets.
There are quite a few metaoperators with different semantics as
explained, next.
=head1 Substitution Operators
=head1 Substitution operators
Each substitution operator comes into two main forms: a lowercase one (e.g., C<s///>) that
performs I<in-place> (i.e., I<destructive> behaviour;
Expand Down Expand Up @@ -222,7 +222,7 @@ value untouched and instead returns the resultant string.
say TR:d/dol // with 'old string'; # OUTPUT: «string␤»
=head1 Assignment Operators
=head1 Assignment operators
Infix operators can be combined with the assignment operator to modify a
value and apply the result to a container in one go. Containers will be
Expand Down Expand Up @@ -251,7 +251,7 @@ Although not strictly operators, methods can be used in the same fashion.
$a = 3.14;
$a .= round; # RESULT: «3»
=head1 Negated Relational Operators
=head1 Negated relational operators
X<|! (negation metaoperator)>X<|!==>X<|!eq>
The result of a relational operator returning C<Bool> can be negated by
Expand All @@ -268,7 +268,7 @@ There are shortcuts for C<!==> and C<!eq>, namely C<!=> and C<ne>.
my $today = Date.today;
say so $release !before $today; # OUTPUT: «False␤»
=head1 Reversed Operators
=head1 Reversed operators
X<|R,reverse metaoperator>
Any infix operator may be called with its two arguments reversed by
Expand All @@ -279,9 +279,9 @@ prefixing with C<R>. Associativity of operands is reversed as well.
X<|»=«>
X<|«=»>
=head1 X<<<Hyper Operators|hyper,<<;hyper,>>;hyper,«;hyper,»;>>>
=head1 X<<<Hyper operators|hyper,<<;hyper,>>;hyper,«;hyper,»;>>>
Hyper Operators include C<«> and C<»>, with their ASCII variants C«<<»
Hyper operators include C<«> and C<»>, with their ASCII variants C«<<»
and C«>>». They apply a given operator enclosed (or preceded or followed, in the case of unary operators) by C<«> and/or C<»> to one or two
lists, returning the resulting list, with the pointy part of C<«> or C<»> aimed at the shorter list. Single elements are turned to a list, so they can be used too. If one of
the lists is shorter than the other, the operator will cycle over the shorter
Expand Down Expand Up @@ -414,7 +414,7 @@ C<\> already, quote it with C<[]> (e.g. C<[\[\x]]>).
my @n = [\~] 1..*;
say @n[^5]; # OUTPUT: «(1 12 123 1234 12345)␤»
=head1 Cross Operators
=head1 Cross operators
X<|X (cross metaoperator)>
The cross metaoperator, C<X>, will apply a given infix operator in order of
Expand All @@ -423,7 +423,7 @@ quickly.
1..3 X~ <a b> # RESULT: «<1a, 1b, 2a, 2b, 3a, 3b>␤»
=head1 Zip Operators
=head1 Zip operators
X<|Z (zip metaoperator)>
The zip metaoperator (which is not the same thing as L<Z|#infix_Z>) will
Expand All @@ -443,15 +443,15 @@ If an infix operator is not given, C<,> (comma operator) will be used by default
my @l = 1 Z 2; # RESULT: «[(1 2)]»
=head1 Sequential Operators
=head1 Sequential operators
X<|S,sequential metaoperator>
The sequential metaoperator, C<S>, will suppress any concurrency or reordering
done by the optimizer. Most simple infix operators are supported.
say so 1 S& 2 S& 3; # OUTPUT: «True␤»
=head1 Nesting of Metaoperators
=head1 Nesting of metaoperators
To avoid ambiguity when chaining metaoperators, use square brackets to help the
compiler understand you.
Expand All @@ -461,7 +461,7 @@ compiler understand you.
@a X[+=] @b;
say @a; # OUTPUT: «[19 20 21]␤»
=head1 Z<>Term Precedence
=head1 Z<>Term precedence
=head2 term C«< >»
Expand Down Expand Up @@ -511,7 +511,7 @@ To always ensure you end up with a L<Hash>, you can use C<%( )> coercer or L<has
The X<L<Array> constructor> returns an itemized L<Array> that does not flatten
in list context.
=head1 Method Postfix Precedence
=head1 Method postfix precedence
=head2 postcircumfix C«[ ]»
Expand Down Expand Up @@ -775,7 +775,7 @@ class or role, even after it has been redefined in the child class.
}
say Foo.Bar::baz; # OUTPUT: «42␤»
=head1 Autoincrement Precedence
=head1 Autoincrement precedence
=head2 prefix X<C«++»|prefix ++>
Expand Down Expand Up @@ -864,7 +864,7 @@ Crossing 0 is prohibited and throws C<X::AdHoc>.
say $filename-- for 1..3;
# OUTPUT: «somefile-003.txt␤somefile-002.txt␤somefile-001.txt␤»
=head1 Exponentiation Precedence
=head1 Exponentiation precedence
=head2 infix C«**»
Expand All @@ -877,7 +877,7 @@ If the right-hand side is a non-negative integer and the left-hand side
is an arbitrary precision type (L<Int>, L<FatRat>), then the calculation
is carried out without loss of precision.
=head1 Symbolic Unary Precedence
=head1 Symbolic unary precedence
=head2 prefix C«?»
Expand Down Expand Up @@ -985,7 +985,7 @@ excluding) the argument.
say ^5; # OUTPUT: «0..^5␤»
for ^5 { } # 5 iterations
=head1 Dotty Infix Precedence
=head1 Dotty infix precedence
These operators are like their Method Postfix counterparts, but require
surrounding whitespace (before and/or after) to distinguish them.
Expand Down Expand Up @@ -1021,7 +1021,7 @@ than postfix C<.meth>.
say -5 .abs; # following whitespace is optional
# OUTPUT: «5␤»
=head1 Multiplicative Precedence
=head1 Multiplicative precedence
=head2 infix C«*»
Expand Down Expand Up @@ -1123,7 +1123,7 @@ Coerces both arguments to L<Int> and returns the greatest common divisor.X<|grea
Coerces both arguments to L<Int> and returns the least common multiple; that is,
the smallest integer that is evenly divisible by both arguments.X<|least common multiple operator>
=head1 Additive Precedence
=head1 Additive precedence
=head2 infix C«+»
Expand Down Expand Up @@ -1181,7 +1181,7 @@ X<Boolean logical OR operator>.
Coerces both arguments to L<Bool> and does a logical I<OR> (inclusive OR)
operation.
=head1 Replication Precedence
=head1 Replication precedence
=head2 infix C«x»
Expand Down Expand Up @@ -1281,7 +1281,7 @@ returns an identity routine that simply returns its argument.
my &composed = [∘];
say composed 'foo'; # OUTPUT: «foo␤»
=head1 Junctive AND (all) Precedence
=head1 Junctive AND (all) precedence
=head2 infix C«&»
Expand All @@ -1292,7 +1292,7 @@ X<All junction operator>.
Creates an I<all> L<Junction> from its arguments. See L<Junction> for more
details.
=head1 Junctive OR (any) Precedence
=head1 Junctive OR (any) precedence
=head2 infix C«|»
Expand All @@ -1319,7 +1319,7 @@ X<One junction operator>.
Creates a I<one> L<Junction> from its arguments. See L<Junction> for more
details.
=head1 Named Unary Precedence
=head1 Named unary precedence
=head2 prefix C«temp»
Expand All @@ -1342,9 +1342,9 @@ restored to its original value.
You can also assign immediately as part of the call to temp:
=begin code :skip-test
temp $a = "five";
=end code
=begin code :skip-test
temp $a = "five";
=end code
Be warned the C<temp> effects get removed once the block is left. If
you were to access the value from, say, within a L<Promise> after
Expand Down Expand Up @@ -1400,7 +1400,7 @@ unsuccessfully, resetting the answer to 42.
=comment this is duplicated in variables.pod
=head1 Nonchaining Binary Precedence
=head1 Nonchaining binary precedence
=head2 infix C«does»
Expand Down Expand Up @@ -1531,7 +1531,7 @@ X<Open range operator>
Constructs a L<Range> from the arguments, excluding both start and end point.
=head1 Chaining Binary Precedence
=head1 Chaining binary precedence
=head2 infix C«==»
Expand Down Expand Up @@ -1867,7 +1867,7 @@ Note that setting $*TOLERANCE = 0 will cause all comparisons to fail.
say 1 =~= 1; # OUTPUT: «False␤»
}
=head1 Tight AND Precedence
=head1 Tight AND precedence
=head2 infix C«&&»
Expand All @@ -1882,7 +1882,7 @@ false value, the arguments to the right are never evaluated.
sub c { die "never called" };
say a() && b() && c(); # OUTPUT: «0␤»
=head1 Tight OR Precedence
=head1 Tight OR precedence
=head2 infix C«||»
Expand Down Expand Up @@ -1976,7 +1976,7 @@ my %loser = points => 20, misses => 10;
# ${:misses(10), :points(20)}..${:misses(10), :points(30)}
=end code
=head1 Conditional Operator Precedence
=head1 Conditional operator precedence
=head2 infix C<?? !!>
Expand Down Expand Up @@ -2149,7 +2149,7 @@ For the non-sed version, see L<C<^ff^>|/routine/^ff^>.
This operator cannot be overloaded, as it's handled specially by the compiler.
=head1 Item Assignment Precedence
=head1 Item Assignment precedence
=head2 X<infix C«=»|item =>
Expand Down Expand Up @@ -2186,7 +2186,7 @@ is interpreted as a named argument.
See L<the Terms language documentation|/language/terms#Pair> for more ways to
create C<Pair> objects.
=head1 Loose Unary Precedence
=head1 Loose unary precedence
=head2 prefix C«not»
Expand All @@ -2204,7 +2204,7 @@ L<traps|/language/traps#Loose_boolean_operators>.
Evaluates its argument in boolean context (and thus collapses L<Junction>s),
and returns the result.
=head1 Comma Operator Precedence
=head1 Comma operator precedence
=head2 infix C«,»
Expand All @@ -2224,7 +2224,7 @@ into a method call.
Infix C<:> is only allowed after the first argument of a non-method call. In
other positions, it's a syntax error.
=head1 List Infix Precedence
=head1 List infix precedence
=head2 infix C«Z»
Expand Down Expand Up @@ -2334,7 +2334,7 @@ well, so the are also checked against the endpoint:
say 1, 2, 4, 8, 16 ... $end;
# OUTPUT: «(1 2 4)␤»
=head1 List Prefix Precedence
=head1 List Prefix precedence
=head2 X<infix C«=»|list =>
Expand Down Expand Up @@ -2520,7 +2520,7 @@ sub good-things { fail }
good-things() notandthen 'boo'.say;
=end code
=head1 Loose OR Precedence
=head1 Loose OR precedence
=head2 infix C«or»
Expand Down Expand Up @@ -2575,7 +2575,7 @@ only if there is one such operand. If more than one operand is true,
it short-circuits after evaluating the second and returns C<Nil>. If all
operands are false, returns the last one.
=head1 Sequencer Precedence
=head1 Sequencer precedence
=head2 infix C«==>»
Expand Down

0 comments on commit ef5badc

Please sign in to comment.