txt: ## operators.md
  ## Chunk 1 of 6
  Operators
  
  Common Raku infixes, prefixes, postfixes, and more!
  
  See [creating operators](/language/optut) on how to define new operators.
  
  # [Operator precedence](#Operators "go to top of document")[§](#Operator_precedence "direct link")
  
  The precedence and associativity of Raku operators determine the order of evaluation of operands in expressions.
  
  Where two operators with a different precedence act on the same operand, the subexpression involving the higher-precedence operator is evaluated first. For instance, in the expression `1 + 2 * 3`, both the binary `+` operator for addition and the binary `*` operator for multiplication act on the operand `2`. Because the `*` operator has a higher precedence than the `+` operator, the subexpression `2 * 3` will be evaluated first. Consequently, the resulting value of the overall expression is `7` and not `9`.
  
  Instead of "precedence" one can also speak of "binding": operators with a higher precedence are then said to have a tighter binding to the operand(s) in question, while operators with a lower precedence are said to have a looser binding. In practice one may also encounter blends of terminology, such as statements that an operator has a tighter or looser precedence.
  
  The following table summarizes the precedence levels offered by Raku, listing them in order from high to low precedence. For each precedence level the table also indicates the associativity (discussed more below) of the operators assigned to that level and lists some example operators at that precedence level.
  
  | Precedence Level | Associativity | Examples |
  | --- | --- | --- |
  | Term¹ | non | 42 3.14 "eek" qq["foo"] $x :!verbose @$array rand time now ∅ |
  | Method call | left | .meth .+ .? .\* .() .[] .{} .<> .«» .:: .= .^ .: i |
  | Autoincrement | non | ++ -- |
  | Exponentiation | right | \*\* |
  | Symbolic unary | left | ! + - ~ ? | || +^ ~^ ?^ ^ // |
  | Dotty infix¹ | left | .= . |
  | Multiplicative | left | \* × / ÷ % %% +& +< +> ~& ~< ~> ?& div mod gcd lcm |
  | Additive | left | + - − +| +^ ~| ~^ ?| ?^ |
  | Replication | left | x xx |
  | Concatenation | list | ~ o ∘ |
  | Junctive and | list | & (&) (.) ∩ ⊍ |
  | Junctive or | list | | ^ (|) (^) (+) (-) ∪ ⊖ ⊎ ∖ |
  | Named unary¹ | left | temp let |
  | Structural | non | but does <=> leg unicmp cmp coll .. ..^ ^.. ^..^ |
  | Chaining | chain | != ≠ == ⩵ < <= ≤ > >= ≥ eq ne lt le gt ge ~~ === ⩶ eqv !eqv =~= ≅ (elem) (cont) (<) (>) (<=) (>=) (<+) (>+) (==) ∈ ∊ ∉ ∋ ∍ ∌ ≡ ≢ ⊂ ⊄ ⊃ ⊅ ⊆ ⊈ ⊇ ⊉ ≼ ≽ |
  | Tight and | list | && |
  | Tight or | list | || ^^ // min max |
  | Conditional¹ | right | ?? !! ff ff^ ^ff ^ff^ fff fff^ ^fff ^fff^ |
  | Item assignment | right | =² => += -= \*\*= xx= |
  | Loose unary | left | so not |
  | Comma | list | , : |
  | List infix | list | Z minmax X X~ X\* Xeqv ... … ...^ …^ ^... ^… ^...^ ^…^ |
  | List prefix | right | =³ ??? !!! ... [+] [\*] Z= |
  | Loose and | list | and andthen notandthen |
  | Loose or | list | or xor orelse |
  | Sequencer¹ | list | <== ==> <<== ==>> |
  | Terminator¹ | non | ; {...} unless extra ) ] } |
  
  Notes:
  
  * for the precedence levels marked with `¹`, there are no operator subroutines with that precedence level (usually because the operators at that precedence level are special-cased by the compiler). This means that you cannot access that precedence level when setting the [precedence of custom operators](/language/functions#Precedence).
  * `=²` denotes [item assignment](#infix_=_(item_assignment)) while `=³` denotes [list assignment operator](#infix_=_(list_assignment)).
  
  # [Operator associativity](#Operators "go to top of document")[§](#Operator_associativity "direct link")
  
  Where two operators with a same precedence level act on an operand, the associativity of the operators determines which subexpression/operator is evaluated first. For instance, in the expression `100 / 2 * 10`, the binary division operator `/` and the binary multiplication operator `*` have equal precedence, so that the order of their evaluation is determined by their associativity. As the two operators are *left associative*, operations are grouped from the left like this: `(100 / 2) * 10`. The expression thus evaluates to `500`. Conversely, if `/` and `*` had both been *right associative*, the expression would have been grouped as `100 / (2 * 10)` and would have evaluated to `5`.
  
  The following table shows how each associativity affects the interpretation of an expression involving three such operators of equal precedence and the same associativity (using a fictitious infix `§` operator):
  
  | Associativity | Meaning of $a § $b § $c § $d |
  | --- | --- |
  | left | (($a § $b) § $c) § $d |
  | right | $a § ($b § ($c § $d)) |
  | non | ILLEGAL |
  | chain | ($a § $b) and ($b § $c) and ($c § $d) |
  | list | infix:<§>($a, $b, $c, $d) |
  
  Although this table only depicts infix operators, associativity also determines the order of evaluation for expressions with other types of operators. For example, if you created an infix `§` operator with the precedence `equiv(&prefix:<~>)`, then the order of evaluation of `~$a § $b` would depend on what associativity you assigned to `§`. If `§` is left associative, then `~$a` will be evaluated first and then passed to `§`; if `§` is right associative, then `$a § $b` will be evaluated first and passed to `~`.
  
  When two operators have the same precedence but *different* associativity, determining the grouping of operands is more complicated. However, for operators built in to Raku, all operators with the same precedence level also have the same associativity.
  
  Setting the associativity of non-infix operators is not yet implemented.
  
  In the operator descriptions below, a default associativity of *left* is assumed.
  
  # [Operator classification](#Operators "go to top of document")[§](#Operator_classification "direct link")
  
  Operators can occur in several positions relative to a term:
  
  |  |  |
  | --- | --- |
  | +term | prefix |
  | term1 + term2 | infix |
  | term++ | postfix |
  | (term) | circumfix |
  | term1[term2] | postcircumfix |
  | .+(term) | method |
  
  Each operator (except method operators) is also available as a subroutine. The name of the routine is formed from the operator category, followed by a colon, then a list quote construct with the symbol(s) that make up the operator:
  
  ```raku
  infix:<+>(1, 2);                # same as 1 + 2
  circumfix:«[ ]»(<a b c>);       # same as [<a b c>]
  ```
  
  As a special case, a *listop* (list operator) can stand either as a term or as a prefix. Subroutine calls are the most common listops. Other cases include metareduced infix operators (`[+] 1, 2, 3`) and the [listop ...](#listop_...) etc. stub operators.
  
  Defining custom operators is covered in [Defining operators functions](/language/functions#Defining_operators).
  
  # [Substitution operators](#Operators "go to top of document")[§](#Substitution_operators "direct link")
  
  Each substitution operator comes into two main forms: a lowercase one (e.g., `s///`) that performs *in-place* (i.e., *destructive* behavior; and an uppercase form (e.g., `S///`) that provides a *non-destructive* behavior.
  
  ## [`s///` in-place substitution](#Operators "go to top of document")[§](#s///_in-place_substitution "direct link")
  
  ```raku
  my $str = 'old string';
  $str ~~ s/o .+ d/new/;
  say $str; # OUTPUT: «new string␤»
  ```
  
  `s///` operates on the `$_` topical variable, changing it in place. It uses the given [`Regex`](/type/Regex) to find portions to replace and changes them to the provided replacement string. Sets `$/` to the [`Match`](/type/Match) object or, if multiple matches were made, a [`List`](/type/List) of [`Match`](/type/Match) objects. Returns `$/`.
  
  It's common to use this operator with the `~~` smartmatch operator, as it aliases left-hand side to `$_`, which `s///` uses.
  
  Regex captures can be referenced in the replacement part; it takes the same adverbs as the [`.subst` method](/routine/subst), which go between the `s` and the opening `/`, separated with optional whitespace:
  
  ```raku
  my $str = 'foo muCKed into the lEn';
  
  # replace second 'o' with 'x'
  $str ~~ s:2nd/o/x/;
  
  # replace 'M' or 'L' followed by non-whitespace stuff with 'd'
  # and lowercased version of that stuff:
  $str ~~ s :g :i/<[ML]> (\S+)/d{lc $0}/;
  
  say $str; # OUTPUT: «fox ducked into the den␤»
  ```
  
  You can also use a different delimiter:
  
  ```raku
  my $str = 'foober';
  $str ~~ s!foo!fox!;
  $str ~~ s{b(.)r} = " d$0n";
  say $str; # OUTPUT: «fox den␤»
  ```
  
  Non-paired characters can simply replace the original slashes. Paired characters, like curly braces, are used only on the match portion, with the substitution given by assignment (of anything: a string, a routine call, etc.).
  
  ## [`S///` non-destructive substitution](#Operators "go to top of document")[§](#S///_non-destructive_substitution "direct link")
  
  ```raku
  say S/o .+ d/new/ with 'old string';      # OUTPUT: «new string␤»
  S:g/« (.)/$0.uc()/.say for <foo bar ber>; # OUTPUT: «Foo␤Bar␤Ber␤»
  ```
  
  `S///` uses the same semantics as the `s///` operator, except it leaves the original string intact and *returns the resultant string* instead of `$/` (`$/` still being set to the same values as with `s///`).
  
  **Note:** since the result is obtained as a return value, using this operator with the `~~` smartmatch operator is a mistake and will issue a warning. To execute the substitution on a variable that isn't the `$_` this operator uses, alias it to `$_` with `given`, `with`, or any other way. Alternatively, use the [`.subst` method](/routine/subst).
  
  ## [`tr///` in-place transliteration](#Operators "go to top of document")[§](#tr///_in-place_transliteration "direct link")
  
  ```raku
  my $str = 'old string';
  $str ~~ tr/dol/wne/;
  say $str; # OUTPUT: «new string␤»
  ```
  
  `tr///` operates on the `$_` topical variable and changes it in place. It behaves similar to [`Str.trans`](/routine/trans) called with a single [`Pair`](/type/Pair) argument, where key is the matching part (characters `dol` in the example above) and value is the replacement part (characters `wne` in the example above). Accepts the same adverbs as [`Str.trans`](/routine/trans). Returns the [`StrDistance`](/type/StrDistance) object that measures the distance between original value and the resultant string.
  
  ```raku
  my $str = 'old string';
  $str ~~ tr:c:d/dol st//;
  say $str; # OUTPUT: «old st␤»
  ```
  
  ## [`TR///` non-destructive transliteration](#Operators "go to top of document")[§](#TR///_non-destructive_transliteration "direct link")
  
  ```raku
  with 'old string' {
      say TR/dol/wne/; # OUTPUT: «new string␤»
  }
  ```
  
  `TR///` behaves the same as the `tr///` operator, except that it leaves the `$_` value untouched and instead returns the resultant string.
  
  ```raku
  say TR:d/dol // with 'old string'; # OUTPUT: «string␤»
  ```
  
  # [Assignment operators](#Operators "go to top of document")[§](#Assignment_operators "direct link")
  
  Raku has a variety of assignment operators, which can be roughly classified as simple assignment operators and compound assignment operators.
  
  The simple assignment operator symbol is `=`. It is 'overloaded' in the sense that it can mean either [item assignment](#infix_=_(item_assignment)) or [list assignment](#infix_=_(list_assignment)) depending on the context in which it is used:
  
  ```raku
  my $x = 1;        # item assignment; $x = 1
  my @x = 1,2,3;    # list assignment; @x = [1,2,3]
  ```
  
  See the section on [item and list assignment](/language/variables#Item_and_list_assignment) for a more elaborate and comparative discussion of these two types of assignment.
  
  The compound assignment operators are [metaoperators](#Metaoperators): they combine the simple assignment operator `=` with an infix operator to form a new operator that performs the operation specified by the infix operator before assigning the result to the left operand. Some examples of built-in compound assignment operators are `+=`, `-=`, `*=`, `/=`, `min=`, and `~=`. Here is how they work:
  
  ```raku
  my $a = 32;
  $a += 10;         # $a = 42
  $a -= 2;          # $a = 40
  
  $a = 3;
  $a min= 5;        # $a = 3
  $a min= 2;        # $a = 2
  
  my $s = 'a';
  $s ~= 'b';        # $s = 'ab'
  
  # And an example of a custom operator:
  sub infix:<space-concat> ($a, $b) { $a ~ " " ~ $b };
  $a = 'word1';
  $a space-concat= 'word2';                 # OUTPUT: «'word1 word2'␤»
  ```
  
  One thing the simple and compound assignment operators have in common is that they form so-called *assignment expressions* that return or evaluate to the assigned value:
  
  ```raku
  my sub fac (Int $n) { [*] 1..$n };        # sub for calculating factorial
  my @x = ( my $y = fac(100), $y*101 );     # @x = [100!, 101!]
  
  my $i = 0;
  repeat { say $i } while ($i += 1) < 10;   # OUTPUT: «0,1,2,...9␤»
  ```
  
  In the first example, the assignment expression `my $y = fac(100)` declares `$y`, assigns the value `fac(100)` to it, and finally returns the assigned value `fac(100)`. The returned value is then taken into account for constructing the List. In the second example the compound-assignment expression `$i += 1` assigns the value `$i + 1` to `$i`, and subsequently evaluates to the assigned value `$i+1`, thus allowing the returned value to be used for judging the while loop condition.
  
  In dealing with simple and compound assignment operators, it is tempting to think that for instance the following two statements are (always) equivalent:
  
  ｢pseudo｣ without highlighting
  
  ```
  
  
  ```
  
  expression1 += expression2;                     # compound assignment
  expression1  = expression1 + expression2;       # simple assignment
  
  
  ```
  
  
  ```
  
  They are not, however, for two reasons. Firstly, `expression1` in the compound assignment statement is evaluated only once, whereas `expression1` in the simple assignment statement is evaluated twice. Secondly, the compound assignment statement may, depending on the infix operator in question, implicitly initialize `expression1` if it is a variable with an undefined value. Such initialization will not occur for `expression1` in the simple assignment statement.
  
  The aforementioned two differences between the simple and compound assignment statements are briefly elucidated below.
  
  The first difference is common amongst programming languages and mostly self-explanatory. In the compound assignment, there is only one `expression1` that is explicitly specified to serve both as a term of the addition to be performed and as the location where the result of the addition, the sum, is to be stored. There is thus no need to evaluate it twice. The simple assignment, in contrast, is more generic in the sense that the value of the `expression1` that serves as a term of the addition need not necessarily be the same as the value of the `expression1` that defines the location where the sum must be stored. The two expressions are therefore evaluated separately. The distinction is particularly relevant in cases where the evaluation of `expression1` has side effects in the form of changes to one or more variables:
  
  ```raku
  my @arr = [10, 20, 30];
  my $i = 0;
  
  if rand < 1/2 {
      @arr[++$i] += 1;                # @arr = [10,21,30]
  } else {
      @arr[++$i] = @arr[++$i] + 1;    # @arr = [10,31,30] (or [10,20,21]?)
  }                                   # the result may be implementation-specific
  say @arr;
  ```
  
  The second difference pointed out above is related to the widespread practice of using compound assignment operators in *accumulator patterns*. Such patterns involve a so-called *accumulator*: a variable that calculates the sum or a product of a series of values in a loop. To obviate the need for explicit accumulator initialization, Raku's compound assignment operators silently take care of the initialization where this is sensibly possible:
  
  ```raku
  my @str = "Cleanliness is next to godliness".comb;
  my ($len, $str);
  for @str -> $c {
    $len += 1;
    $str ~= $c;
  }
  say "The string '$str' has $len characters.";
  ```
  
  In this example the accumulators `$len` and `$str` are implicitly initialized to `0` and `""`, respectively, which illustrates that the initialization value is operator-specific. In this regard it is also noted that not all compound assignment operators can sensibly initialize an undefined left-hand side variable. The `/=` operator, for instance, will not arbitrarily select a value for the dividend; instead, it will throw an exception.
  
  Although not strictly operators, methods can be used in the same fashion as compound assignment operators:
  
  ```raku
  my $a = 3.14;
  $a .= round;      # $a = $a.round; OUTPUT: «3»
  ```
  
  # [Metaoperators](#Operators "go to top of document")[§](#Metaoperators "direct link")
  
  Metaoperators can be parameterized with other operators or subroutines in the same way as functions can take other functions as parameters. To use a subroutine as a parameter, prefix its name with an `&`. Raku will generate the actual combined operator in the background, allowing the mechanism to be applied to user defined operators. To disambiguate chained metaoperators, enclose the inner operator in square brackets. There are quite a few metaoperators with different semantics as explained, next.
  
  ## [Negated relational operators](#Operators "go to top of document")[§](#Negated_relational_operators "direct link")
  
  The result of a relational operator returning [`Bool`](/type/Bool) can be negated by prefixing with `!`. To avoid visual confusion with the `!!` operator, you may not modify any operator already beginning with `!`.
  
  There are shortcuts for `!==` and `!eq`, namely `!=` and `ne`.
  
  ```raku
  my $a = True;
  say so $a != True;    # OUTPUT: «False␤»
  
  my $release = Date.new(:2015year, :12month, :24day);
  my $today = Date.today;
  say so $release !before $today;     # OUTPUT: «False␤»
  ```
  
  ## [Reversed operators](#Operators "go to top of document")[§](#Reversed_operators "direct link")
  
  Any infix operator may be called with its two arguments reversed by prefixing with `R`. Associativity of operands is reversed as well.
  
  ```raku
  say 4 R/ 12;               # OUTPUT: «3␤»
  say [R/] 2, 4, 16;         # OUTPUT: «2␤»
  say [RZ~] <1 2 3>,<4 5 6>  # OUTPUT: «(41 52 63)␤»
  ```
  
  ## [Hyper operators](#Operators "go to top of document")[§](#Hyper_operators "direct link")
  
  Hyper operators include `«` and `»`, with their ASCII variants `<<` and `>>`. They apply a given operator enclosed (or preceded or followed, in the case of unary operators) by `«` and/or `»` to one or two lists, returning the resulting list, with the pointy part of `«` or `»` 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 list until all elements of the longer list are processed.
  
  ```raku
  say (1, 2, 3) »*» 2;          # OUTPUT: «(2 4 6)␤»
  say (1, 2, 3, 4) »~» <a b>;   # OUTPUT: «(1a 2b 3a 4b)␤»
  say (1, 2, 3) »+« (4, 5, 6);  # OUTPUT: «(5 7 9)␤»
  say (&sin, &cos, &sqrt)».(0.5);
  # OUTPUT: «(0.479425538604203 0.877582561890373 0.707106781186548)␤»
  ```
  
  The last example illustrates how postcircumfix operators (in this case .()) can also be hypered.
  
  ```raku
  my @a = <1 2 3>;
  my @b = <4 5 6>;
  say (@a,@b)»[1]; # OUTPUT: «(2 5)␤»
  ```
  
  In this case, it's the [postcircumfix[]](#circumfix_[_]) which is being hypered.
  
  Assignment metaoperators can be *hyped*.
  
  ```raku
  my @a = 1, 2, 3;
  say @a »+=» 1;    # OUTPUT: «[2 3 4]␤»
  my ($a, $b, $c);
  (($a, $b), $c) «=» ((1, 2), 3);
  say "$a, $c";       #  OUTPUT: «1, 3␤»
  ```
  
  Hyper forms of unary operators have the pointy bit aimed at the operator and the blunt end at the list to be operated on.
  
  ```raku
  my @wisdom = True, False, True;
  say !« @wisdom;     # OUTPUT: «[False True False]␤»
  
  my @a = 1, 2, 3;
  @a»++;
  say @a;             # OUTPUT: «[2 3 4]␤»
  ```
  
  Hyper operators are defined recursively on nested arrays.
  
  ```raku
  say -« [[1, 2], 3]; # OUTPUT: «[[-1 -2] -3]␤»
  ```
  
  Also, methods can be called in an out of order, concurrent fashion. The resulting list will be in order. Note that all hyper operators are candidates for parallelism and will cause tears if the methods have side effects. The optimizer has full reign over hyper operators, which is the reason that they cannot be defined by the user.
  
  ```raku
  class CarefulClass { method take-care {} }
  my CarefulClass @objs;
  my @results = @objs».take-care();
  
  my @slops;        # May Contain Nuts
  @slops».?this-method-may-not-exist();
  ```
  
  Hyper operators can work with hashes. The pointy direction indicates if missing keys are to be ignored in the resulting hash. The enclosed operator operates on all values that have keys in both hashes.
  
  |  |  |
  | --- | --- |
  | %foo «+» %bar; | intersection of keys |
  | %foo »+« %bar; | union of keys |
  | %outer »+» %inner; | only keys of %inner that exist in %outer will occur in the result |
  
  ```raku
  my %outer = 1, 2, 3 Z=> <a b c>;
  my %inner = 1, 2 Z=> <x z>;
  say %outer «~» %inner;          # OUTPUT: «{"1" => "ax", "2" => "bz"}␤»
  ```
  
  Hyper operators can take user-defined operators as their operator argument.
  
  ```raku
  sub pretty-file-size (Int $size --> Str) {
      # rounding version of infix:</>(Int, Int)
      sub infix:<r/>(Int \i1, Int \i2) {
          round(i1 / i2, 0.1)
      }
  
      # we build a vector of fractions of $size and zip that with the fitting prefix
      for $size «[r/]« (2**60, 2**50, 2**40, 2**30, 2**20, 2**10)
                Z      <EB     PB     TB     GB     MB     KB> -> [\v,\suffix] {
          # starting with the biggest suffix,
          # we take the first that is 0.5 of that suffix or bigger
          return v ~ ' ' ~ suffix if v > 0.4
      }
      # this be smaller or equal then 0.4 KB
      return $size.Str;
  }
  
  for 60, 50, 40, 30, 20, 10 -> $test {
      my &a = { (2 ** $test) * (1/4, 1/2, 1, 10, 100).pick * (1..10).pick };
      print pretty-file-size(a.Int) xx 2, ' ';
  }
  
  # OUTPUT: «10 EB 4 EB 2 PB 5 PB 0.5 PB 4 TB 300 GB 4.5 GB 50 MB 200 MB 9 KB 0.6 MB␤»
  ```
  
  Whether hyperoperators descend into child lists depends on the [nodality](/language/typesystem#trait_is_nodal) of the inner operator of a chain. For the hyper method call operator (».), the nodality of the target method is significant.
  
  ```raku
  say (<a b>, <c d e>)».elems;        # OUTPUT: «(2 3)␤»
  say (<a b>, <c d e>)».&{ .elems };  # OUTPUT: «((1 1) (1 1 1))␤»
  ```
  
  You can chain hyper operators to destructure a List of Lists.
  
  ```raku
  my $neighbors = ((-1, 0), (0, -1), (0, 1), (1, 0));
  my $p = (2, 3);
  say $neighbors »>>+<<» ($p, *);   # OUTPUT: «((1 3) (2 2) (2 4) (3 3))␤»
  ```
  
  ## [Reduction metaoperators](#Operators "go to top of document")[§](#Reduction_metaoperators "direct link")
  
  The reduction metaoperator, `[ ]`, reduces a list with the given infix operator. It gives the same result as the [reduce](/routine/reduce) routine - see there for details.
  
  ```raku
  # These two are equivalent:
  say [+] 1, 2, 3;                # OUTPUT: «6␤»
  say reduce &infix:<+>, 1, 2, 3; # OUTPUT: «6␤»
  ```
  
  No whitespace is allowed between the square brackets and the operator. To wrap a function instead of an operator, provide an additional layer of square brackets:
  
  ```raku
  sub plus { $^a + $^b };
  say [[&plus]] 1, 2, 3;          # OUTPUT: «6␤»
  ```
  
  The argument list is iterated without flattening. This means that you can pass a nested list to the reducing form of a list infix operator:
  
  ```raku
  say [X~] (1, 2), <a b>;         # OUTPUT: «(1a 1b 2a 2b)␤»
  ```
  
  which is equivalent to `1, 2 X~ <a b>`.
  
  By default, only the final result of the reduction is returned. Prefix the wrapped operator with a `\`, to return a lazy list of all intermediate values instead. This is called a "triangular reduce". If the *non-meta* part contains a `\` already, quote it with `[]` (e.g. `[\[\x]]`).
  
  ```raku
  my @n = [\~] 1..*;
  say @n[^5];         # OUTPUT: «(1 12 123 1234 12345)␤»
  ```
  
  ## [Cross metaoperators](#Operators "go to top of document")[§](#Cross_metaoperators "direct link")
  
  The cross metaoperator, `X`, will apply a given infix operator in order of cross product to all lists, such that the rightmost operand varies most quickly.
  
  ```raku
  1..3 X~ <a b> # OUTPUT: «<1a, 1b, 2a, 2b, 3a, 3b>␤»
  ```
  
  ## [Zip metaoperator](#Operators "go to top of document")[§](#Zip_metaoperator "direct link")
  
  The zip metaoperator (which is not the same thing as [Z](#infix_Z)) will apply a given infix operator to pairs taken one left, one right, from its arguments. The resulting list is returned.
  
  ```raku
  my @l = <a b c> Z~ 1, 2, 3;     # OUTPUT: «[a1 b2 c3]␤»
  ```
  
  If one of the operands runs out of elements prematurely, the zip operator will stop. An infinite list can be used to repeat elements. A list with a final element of `*` will repeat its 2nd last element indefinitely.
  
  ```raku
  my @l = <a b c d> Z~ ':' xx *;  # OUTPUT: «<a: b: c: d:>»
     @l = <a b c d> Z~ 1, 2, *;   # OUTPUT: «<a1 b2 c2 d2>»
  ```
  
  If an infix operator is not given, the `,` (comma operator) will be used by default:
  
  ```raku
  my @l = 1 Z 2;  # OUTPUT: «[(1 2)]»
  ```
  
  ## [Sequential operators](#Operators "go to top of document")[§](#Sequential_operators "direct link")
  
  The sequential metaoperator, `S`, will suppress any concurrency or reordering done by the optimizer. Most simple infix operators are supported.
  
  ```raku
  say so 1 S& 2 S& 3;  # OUTPUT: «True␤»
  ```
  
  ## [Nesting of metaoperators](#Operators "go to top of document")[§](#Nesting_of_metaoperators "direct link")
  
  To avoid ambiguity when chaining metaoperators, use square brackets to help the compiler understand you.
  
  ```raku
  my @a = 1, 2, 3;
  my @b = 5, 6, 7;
  @a X[+=] @b;
  say @a;         # OUTPUT: «[19 20 21]␤»
  ```
  
  # [Term precedence](#Operators "go to top of document")[§](#Term_precedence "direct link")
  
  ## [term `< >`](#Operators "go to top of document")[§](#term_<_> "direct link")
  
  The quote-words construct breaks up the contents on whitespace and returns a [`List`](/type/List) of the words. If a word looks like a number literal or a [`Pair`](/type/Pair) literal, it's converted to the appropriate number.
  
  ```raku
  say <a b c>[1];   # OUTPUT: «b␤»
  ```
  
  ## [term `( )`](#Operators "go to top of document")[§](#term_(_) "direct link")
  
  The grouping operator.
  
  An empty group `()` creates an [empty list](/type/List#index-entry-()_(empty_list)). Parentheses around non-empty expressions simply structure the expression, but do not have additional semantics.
  
  In an argument list, putting parenthesis around an argument prevents it from being interpreted as a named argument.
  
  ```raku
  multi p(:$a!) { say 'named'      }
  multi p($a)   { say 'positional' }
  p a => 1;           # OUTPUT: «named␤»
  p (a => 1);         # OUTPUT: «positional␤»
  ```
  
  ## [term `{ }`](#Operators "go to top of document")[§](#term_{_} "direct link")
  
  [`Block`](/type/Block) or [`Hash`](/type/Hash) constructor.
  
  If the content is empty, or contains a single list that starts with a [`Pair`](/type/Pair) literal or `%`-sigiled variable, and the [`$_` variable](/syntax/$_) or placeholder parameters are not used, the constructor returns a [`Hash`](/type/Hash). Otherwise it constructs a [`Block`](/type/Block).
  
  To force construction of a [`Block`](/type/Block), follow the opening brace with a semicolon. To always ensure you end up with a [`Hash`](/type/Hash), you can use `%( )` coercer or [hash](/routine/hash) routine instead:
  
  ```raku
  {}.^name.say;        # OUTPUT: «Hash␤»
  {;}.^name.say;       # OUTPUT: «Block␤»
  
  {:$_}.^name.say;     # OUTPUT: «Block␤»
  %(:$_).^name.say;    # OUTPUT: «Hash␤»
  hash(:$_).^name.say; # OUTPUT: «Hash␤»
  ```
  
  ## [circumfix `[ ]`](#Operators "go to top of document")[§](#circumfix_[_] "direct link")
  
  The Array constructor returns an itemized [`Array`](/type/Array) that does not flatten in list context. Check this:
  
  ```raku
  say .raku for [3,2,[1,0]]; # OUTPUT: «3␤2␤$[1, 0]␤»
  ```
  
  This array is itemized, in the sense that every element constitutes an item, as shown by the `$` preceding the last element of the array, the [(list) item contextualizer](/type/Any#index-entry-%24_%28item_contextualizer%29).
  
  # [Terms](#Operators "go to top of document")[§](#Terms "direct link")
  
  Terms have their [own extended documentation](/language/terms).
  
  # [Method postfix precedence](#Operators "go to top of document")[§](#Method_postfix_precedence "direct link")
  
  ## [postcircumfix `[ ]`](#Operators "go to top of document")[§](#postcircumfix_[_] "direct link")
  
  ```r