txt: ## operators.md
  ## Chunk 2 of 6
  aku
  sub postcircumfix:<[ ]>(@container, **@index,
                          :$k, :$v, :$kv, :$p, :$exists, :$delete)
  ```
  
  Universal interface for positional access to zero or more elements of @container, a.k.a. "array indexing operator".
  
  ```raku
  my @alphabet = 'a' .. 'z';
  say @alphabet[0];                   # OUTPUT: «a␤»
  say @alphabet[1];                   # OUTPUT: «b␤»
  say @alphabet[*-1];                 # OUTPUT: «z␤»
  say @alphabet[100]:exists;          # OUTPUT: «False␤»
  say @alphabet[17, 0, 10, 20].join;  # OUTPUT: «raku␤»
  say @alphabet[23 .. *].raku;        # OUTPUT: «("x", "y", "z")␤»
  
  @alphabet[1, 2] = "B", "C";
  say @alphabet[0..3].raku;           # OUTPUT: «("a", "B", "C", "d")␤»
  ```
  
  See [Subscripts](/language/subscripts), for a more detailed explanation of this operator's behavior and for how to implement support for it in custom types.
  
  ## [postcircumfix `{ }`](#Operators "go to top of document")[§](#postcircumfix_{_} "direct link")
  
  ```raku
  sub postcircumfix:<{ }>(%container, **@key,
                          :$k, :$v, :$kv, :$p, :$exists, :$delete)
  ```
  
  Universal interface for associative access to zero or more elements of a %container, a.k.a. "hash indexing operator".
  
  ```raku
  my %color = kiwi => "green", banana => "yellow", cherry => "red";
  say %color{"banana"};                 # OUTPUT: «yellow␤»
  say %color{"cherry", "kiwi"}.raku;    # OUTPUT: «("red", "green")␤»
  say %color{"strawberry"}:exists;      # OUTPUT: «False␤»
  
  %color{"banana", "lime"} = "yellowish", "green";
  %color{"cherry"}:delete; # note that value is always returned but removal only happens when delete is true.
  say %color;             # OUTPUT: «banana => yellowish, kiwi => green, lime => green␤»
  ```
  
  See [`postcircumfix < >`](/language/operators#postcircumfix_<_>) and [`postcircumfix « »`](/routine/« »#(Operators)_postcircumfix_«_») for convenient shortcuts, and [Subscripts](/language/subscripts) for a more detailed explanation of this operator's behavior and how to implement support for it in custom types.
  
  ## [postcircumfix `<>`](#Operators "go to top of document")[§](#postcircumfix_<> "direct link")
  
  Decontainerization operator, which extracts the value from a container and makes it independent of the container type.
  
  ```raku
  use JSON::Tiny;
  
  my $config = from-json('{ "files": 3, "path": "/home/some-user/raku.rakudoc" }');
  say $config.raku;      # OUTPUT: «${:files(3), :path("/home/some-user/raku.rakudoc")}␤»
  my %config-hash = $config<>;
  say %config-hash.raku; # OUTPUT: «{:files(3), :path("/home/some-user/raku.rakudoc")}␤»
  
  ```
  
  It's a [`Hash`](/type/Hash) in both cases, and it can be used like that; however, in the first case it was in item context, and in the second case it has been extracted to its proper context.
  
  ## [postcircumfix `< >`](#Operators "go to top of document")[§](#postcircumfix_<_> "direct link")
  
  Shortcut for [`postcircumfix { }`](/routine/{ }#(Operators)_postcircumfix_{_}) that quotes its argument using the same rules as the [quote-words operator](#term_<_>) of the same name.
  
  ```raku
  my %color = kiwi => "green", banana => "yellow", cherry => "red";
  say %color<banana>;               # OUTPUT: «yellow␤»
  say %color<cherry kiwi>.raku;     # OUTPUT: «("red", "green")␤»
  say %color<strawberry>:exists;    # OUTPUT: «False␤»
  ```
  
  Technically, not a real operator; it's syntactic sugar that's turned into the `{ }` postcircumfix operator at compile-time.
  
  ## [postcircumfix `« »`](#Operators "go to top of document")[§](#postcircumfix_«_» "direct link")
  
  Shortcut for [`postcircumfix { }`](/routine/{ }#(Operators)_postcircumfix_{_}) that quotes its argument using the same rules as the [interpolating quote-words operator](/language/quoting#Word_quoting_with_interpolation_and_quote_protection:_«_») of the same name.
  
  ```raku
  my %color = kiwi => "green", banana => "yellow", cherry => "red";
  my $fruit = "kiwi";
  say %color«cherry "$fruit"».raku;   # OUTPUT: «("red", "green")␤»
  ```
  
  Technically, not a real operator; it's syntactic sugar that's turned into the `{ }` postcircumfix operator at compile-time.
  
  ## [postcircumfix `( )`](#Operators "go to top of document")[§](#postcircumfix_(_) "direct link")
  
  The call operator treats the invocant as a [`Callable`](/type/Callable) and invokes it, using the expression between the parentheses as arguments.
  
  Note that an identifier followed by a pair of parentheses is always parsed as a subroutine call.
  
  If you want your objects to respond to the call operator, implement a [`method CALL-ME`](/routine/CALL-ME).
  
  ## [methodop `.`](#Operators "go to top of document")[§](#methodop_. "direct link")
  
  The operator for calling one method, `$invocant.method`.
  
  Technically, not a real operator; it's syntax special-cased in the compiler.
  
  ## [methodop `.&`](#Operators "go to top of document")[§](#methodop_.& "direct link")
  
  The operator to call a [`Callable`](/type/Callable), such as a [`Block`](/type/Block), a [`Method`](/type/Method), or a [`Sub`](/type/Sub) with method syntax. The invocant will be bound to the first positional argument (and thus dispatch will fail if the [`Callable`](/type/Callable) does not accept at least one positional argument).
  
  Technically, not a real operator; it's syntax special-cased in the compiler.
  
  ```raku
  my sub f($invocant){ "The arg has a value of $invocant" }
  42.&f;
  # OUTPUT: «The arg has a value of 42␤»
  
  42.&(-> $invocant { "The arg has a value of $invocant" });
  # OUTPUT: «The arg has a value of 42␤»
  ```
  
  ## [methodop `.=`](#Operators "go to top of document")[§](#methodop_.= "direct link")
  
  A mutating method call. `$invocant.=method` desugars to `$invocant = $invocant.method`, similar to [= (item assignment)](/routine/= (item assignment)) .
  
  Technically, not a real operator; it's syntax special-cased in the compiler.
  
  ## [methodop `.^`](#Operators "go to top of document")[§](#methodop_.^ "direct link")
  
  A metamethod call. `$invocant.^method` calls `method` on `$invocant`'s metaclass. It desugars to `$invocant.HOW.method($invocant, ...)`. See [the metaobject protocol documentation](/language/mop) for more information.
  
  Technically, not a real operator; it's syntax special-cased in the compiler. It can be also applied, within classes, to access metamethods on self:
  
  ```raku
  class Foo {
      has $.a = 3;
      method bar {
          return $.^name
      }
  };
  say Foo.new.bar; # OUTPUT: «Foo␤»
  
  ```
  
  ## [methodop `.?`](#Operators "go to top of document")[§](#methodop_.? "direct link")
  
  Safe call operator. `$invocant.?method` calls method `method` on `$invocant` if it has a method of such name. Otherwise it returns [`Nil`](/type/Nil).
  
  Technically, not a real operator; it's syntax special-cased in the compiler.
  
  ## [methodop `.+`](#Operators "go to top of document")[§](#methodop_.+ "direct link")
  
  `$foo.+meth` walks the [MRO](/language/objects#index-entry-MRO) and calls all the methods called `meth` and submethods called `meth` if the type is the same as type of `$foo`. Those methods might be multis, in which case the matching candidate would be called.
  
  After that, a [`List`](/type/List) of the results are returned. If no such method was found, it throws an [`X::Method::NotFound`](/type/X/Method/NotFound) exception.
  
  ```raku
  class A {
    method foo { say "from A"; }
  }
  class B is A {
    multi method foo { say "from B"; }
    multi method foo(Str) { say "from B (Str)"; }
  }
  class C is B is A {
    multi method foo { say "from C"; }
    multi method foo(Str) { say "from C (Str)"; }
  }
  
  say C.+foo; # OUTPUT: «from C␤from B␤from A␤(True True True)␤»
  ```
  
  ## [methodop `.*`](#Operators "go to top of document")[§](#methodop_.* "direct link")
  
  `$foo.*meth` walks the [MRO](/language/objects#index-entry-MRO) and calls all the methods called `meth` and submethods called `meth` if the type is the same as type of `$foo`. Those methods might be multis, in which case the matching candidate would be called.
  
  After that, a [`List`](/type/List) of the results are returned. If no such method was found, an empty [`List`](/type/List) is returned.
  
  Technically, postfix `.+` calls `.*` at first. Read postfix `.+` section to see examples.
  
  ## [methodop `».` / methodop `>>.`](#Operators "go to top of document")[§](#methodop_»._/_methodop_>>. "direct link")
  
  This is the hyper method call operator. Will call a method on all elements of a [`List`](/type/List) out of order and return the list of return values in order.
  
  ```raku
  my @a = <a b c>;
  my @b = @a».ord;                  # OUTPUT: «[97, 98, 99]␤»
  # The first parameter of a method is the invocant.
  sub foo(Str:D $c){ $c.ord * 2 };
  # So we can pretend to have a method call with a sub that got a good
  # first positional argument.
  say @a».&foo;
  # Blocks have an implicit positional arguments that lands in $_. The latter can
  # be omitted for method calls.
  say @a».&{ .ord};
  
  ```
  
  Hyper method calls may appear to be the same as doing a [map](/routine/map) call, however along with being a hint to the compiler that it can parallelize the call, the behavior is also affected by [nodality of the method](/routine/is%20nodal) being invoked, depending on which either [nodemap](/routine/nodemap) or [deepmap](/routine/deepmap) semantics are used to perform the call.
  
  The nodality is checked by looking up whether the [`Callable`](/type/Callable) provides `nodal` method. If the hyper is applied to a method, that [`Callable`](/type/Callable) is that method name, looked up on [`List`](/type/List) type; if the hyper is applied to a routine (e.g. `».&foo`), that routine functions as that [`Callable`](/type/Callable). If the [`Callable`](/type/Callable) is determined to provide `nodal` method, [nodemap](/routine/nodemap) semantics are used to perform the hyper call, otherwise [duckmap](/routine/duckmap) semantics are used.
  
  Take care to avoid a [common mistake](/language/traps#Using_»_and_map_interchangeably) of expecting side-effects to occur in order. The following `say` is **not** guaranteed to produce the output in order:
  
  ```raku
  @a».say;  # WRONG! Could produce a␤b␤c␤ or c␤b␤a␤ or any other order
  
  ```
  
  ## [methodop `.postfix` / `.postcircumfix`](#Operators "go to top of document")[§](#methodop_.postfix_/_.postcircumfix "direct link")
  
  In most cases, a dot may be placed before a postfix or postcircumfix:
  
  ```raku
  my @a;
  @a[1, 2, 3];
  @a.[1, 2, 3]; # Same
  ```
  
  This can be useful for visual clarity or brevity. For example, if an object's attribute is a function, putting a pair of parentheses after the attribute name will become part of the method call. So, either two pairs of parentheses must be used or a dot has to come before the parentheses to separate it from the method call.
  
  ```raku
  class Operation {
      has $.symbol;
      has &.function;
  }
  my $addition = Operation.new(:symbol<+>, :function{ $^a + $^b });
  say $addition.function()(1, 2);   # OUTPUT: «3␤»
  # OR
  say $addition.function.(1, 2);    # OUTPUT: «3␤»
  ```
  
  If the postfix is an identifier, however, it will be interpreted as a normal method call.
  
  ```raku
  1.i # No such method 'i' for invocant of type 'Int'
  
  ```
  
  Technically, not a real operator; it's syntax special-cased in the compiler.
  
  ## [methodop `.:<prefix operator>`](#Operators "go to top of document")[§](#methodop_.:<prefix_operator> "direct link")
  
  An operator in prefix form can still be called like a method, that is, using the `.` methodop notation, by preceding it by a colon. For example:
  
  ```raku
  my $a = 1;
  say ++$a;       # OUTPUT: «2␤»
  say $a.:<++>;   # OUTPUT: «3␤»
  ```
  
  Technically, not a real operator; it's syntax special-cased in the compiler, that is why it's classified as a *methodop*.
  
  ## [methodop `.::`](#Operators "go to top of document")[§](#methodop_.:: "direct link")
  
  A class-qualified method call, used to call a method as defined in a parent class or role, even after it has been redefined in the child class.
  
  ```raku
  class Bar {
      method baz { 42 }
  }
  class Foo is Bar {
      method baz { "nope" }
  }
  say Foo.Bar::baz;       # OUTPUT: «42␤»
  ```
  
  ## [postfix `,=`](#Operators "go to top of document")[§](#postfix_,= "direct link")
  
  Creates an object that concatenates, in a class-dependent way, the contents of the variable on the left hand side and the expression on the right hand side:
  
  ```raku
  my %a = :11a, :22b;
  %a ,= :33x;
  say %a # OUTPUT: «{a => 11, b => 22, x => 33}␤»
  ```
  
  # [Autoincrement precedence](#Operators "go to top of document")[§](#Autoincrement_precedence "direct link")
  
  ## [`++`](#Operators "go to top of document")[§](#prefix_++ "direct link")
  
  ```raku
  multi prefix:<++>($x is rw) is assoc<non>
  ```
  
  Increments its argument by one and returns the updated value.
  
  ```raku
  my $x = 3;
  say ++$x;   # OUTPUT: «4␤»
  say $x;     # OUTPUT: «4␤»
  ```
  
  It works by calling the [succ](/routine/succ) method (for *successor*) on its argument, which gives custom types the freedom to implement their own increment semantics.
  
  ## [`--`](#Operators "go to top of document")[§](#prefix_-- "direct link")
  
  ```raku
  multi prefix:<-->($x is rw) is assoc<non>
  ```
  
  Decrements its argument by one and returns the updated value.
  
  ```raku
  my $x = 3;
  say --$x;   # OUTPUT: «2␤»
  say $x;     # OUTPUT: «2␤»
  ```
  
  It works by calling the [pred](/routine/pred) method (for *predecessor*) on its argument, which gives custom types the freedom to implement their own decrement semantics.
  
  ## [`++`](#Operators "go to top of document")[§](#postfix_++ "direct link")
  
  ```raku
  multi postfix:<++>($x is rw) is assoc<non>
  ```
  
  Increments its argument by one and returns the original value.
  
  ```raku
  my $x = 3;
  say $x++;   # OUTPUT: «3␤»
  say $x;     # OUTPUT: «4␤»
  ```
  
  It works by calling the [succ](/routine/succ) method (for *successor*) on its argument, which gives custom types the freedom to implement their own increment semantics; when undefined, it sets the value to 1 and returns it.
  
  ```raku
  my $x;
  $x++;
  say $x;     # OUTPUT: «1␤»
  ```
  
  Note that this does not necessarily return its argument; e.g., for undefined values, it returns 0:
  
  ```raku
  my $x;
  say $x++;   # OUTPUT: «0␤»
  say $x;     # OUTPUT: «1␤»
  ```
  
  Increment on [`Str`](/type/Str) will increment the number part of a string and assign the resulting string to the container. An `is rw` container is required.
  
  ```raku
  my $filename = "somefile-001.txt";
  say $filename++ for 1..3;
  # OUTPUT: «somefile-001.txt␤somefile-002.txt␤somefile-003.txt␤»
  ```
  
  This will act on any Unicode numeral:
  
  ```raku
  my $was٧ = "ثمانية٧";
  $was٧++;
  say $was٧; # OUTPUT: «ثمانية٨␤»
  
  ```
  
  Including, since version 6.d, Thai numerals
  
  ```raku
  my $เลขไทย="๙๙";
  $เลขไทย++;
  say $เลขไทย; # OUTPUT: «๑๐๐␤»
  
  ```
  
  ## [`--`](#Operators "go to top of document")[§](#postfix_-- "direct link")
  
  ```raku
  multi postfix:<-->($x is rw) is assoc<non>
  ```
  
  Decrements its argument by one and returns the original value.
  
  ```raku
  my $x = 3;
  say $x--;   # OUTPUT: «3␤»
  say $x;     # OUTPUT: «2␤»
  ```
  
  It works by calling the [pred](/routine/pred) method (for *predecessor*) on its argument, which gives custom types the freedom to implement their own decrement semantics.
  
  Note that this does not necessarily return its argument;e.g., for undefined values, it returns 0:
  
  ```raku
  my $x;
  say $x--;   # OUTPUT: «0␤»
  say $x;     # OUTPUT: «-1␤»
  ```
  
  Decrement on [`Str`](/type/Str) will decrement the number part of a string and assign the resulting string to the container. An `is rw` container is required. Crossing 0 is prohibited and throws [`X::AdHoc`](/type/X/AdHoc).
  
  ```raku
  my $filename = "somefile-003.txt";
  say $filename-- for 1..3;
  # OUTPUT: «somefile-003.txt␤somefile-002.txt␤somefile-001.txt␤»
  ```
  
  # [Exponentiation precedence](#Operators "go to top of document")[§](#Exponentiation_precedence "direct link")
  
  ## [infix `**`](#Operators "go to top of document")[§](#infix_** "direct link")
  
  ```raku
  multi infix:<**>(Any, Any --> Numeric:D) is assoc<right>
  ```
  
  The exponentiation operator coerces both arguments to [`Numeric`](/type/Numeric) and calculates the left-hand-side raised to the power of the right-hand side.
  
  If the right-hand side is a non-negative integer and the left-hand side is an arbitrary precision type ([`Int`](/type/Int), [`FatRat`](/type/FatRat)), then the calculation is carried out without loss of precision.
  
  Unicode superscripts will behave in exactly the same way.
  
  ```raku
  sub squared( Int $num ) { $num² };
  say squared($_) for ^5; # OUTPUT: «0␤1␤4␤9␤16␤»
  ```
  
  It also works for sequences of several Unicode superscript numbers:
  
  ```raku
  sub twenty-second-power( Int $num ) { $num²² };
  say twenty-second-power($_) for ^5; # OUTPUT: «0␤1␤4194304␤31381059609␤17592186044416␤»
  ```
  
  # [Symbolic unary precedence](#Operators "go to top of document")[§](#Symbolic_unary_precedence "direct link")
  
  ## [prefix `?`](#Operators "go to top of document")[§](#prefix_? "direct link")
  
  ```raku
  multi prefix:<?>(Mu --> Bool:D)
  ```
  
  Boolean context operator.
  
  Coerces the argument to [`Bool`](/type/Bool) by calling the [`Bool`](/type/Bool) method on it. Note that this collapses [`Junction`](/type/Junction)s.
  
  ## [prefix `!`](#Operators "go to top of document")[§](#prefix_! "direct link")
  
  ```raku
  multi prefix:<!>(Mu --> Bool:D)
  ```
  
  Negated Boolean context operator.
  
  Coerces the argument to [`Bool`](/type/Bool) by calling the [`Bool`](/type/Bool) method on it, and returns the negation of the result. Note that this collapses [`Junction`](/type/Junction)s.
  
  ## [prefix `//`](#Operators "go to top of document")[§](#prefix_// "direct link")
  
  ```raku
  multi prefix:<//>(Any --> Bool:D)
  ```
  
  Boolean context operator.
  
  Available as of 6.e language version (early implementation exists in Rakudo compiler 2022.12+).
  
  Coerces the argument to [`Boolean`](/type/Bool) by calling the `defined` method on it.
  
  ## [prefix `+`](#Operators "go to top of document")[§](#prefix_+ "direct link")
  
  ```raku
  multi prefix:<+>(Any --> Numeric:D)
  ```
  
  Numeric context operator.
  
  Coerces the argument to [`Numeric`](/type/Numeric) by calling the `Numeric` method on it.
  
  ## [prefix `-`](#Operators "go to top of document")[§](#prefix_- "direct link")
  
  ```raku
  multi prefix:<->(Any --> Numeric:D)
  ```
  
  Negative numeric context operator.
  
  Coerces the argument to [`Numeric`](/type/Numeric) by calling the `Numeric` method on it, and then negates the result.
  
  ## [prefix `~`](#Operators "go to top of document")[§](#prefix_~ "direct link")
  
  ```raku
  multi prefix:<~>(Any --> Str:D)
  ```
  
  String context operator.
  
  Coerces the argument to [`Str`](/type/Str) by calling the [Str](/type/List#method_Str) method on it.
  
  ## [prefix `|`](#Operators "go to top of document")[§](#prefix_| "direct link")
  
  Flattens objects of type [`Capture`](/type/Capture), [`Pair`](/type/Pair), [`List`](/type/List), [`Map`](/type/Map) and [`Hash`](/type/Hash) into an argument list.
  
  ```raku
  sub slurpee( |args ){
      say args.raku
  };
  slurpee( <a b c d>, { e => 3 }, 'e' => 'f' => 33 )
  # OUTPUT: «\(("a", "b", "c", "d"), {:e(3)}, :e(:f(33)))␤»
  ```
  
  Please see the [signature literals page, specially the section on Captures](/language/signatures#Capture_parameters) for more information on the subject.
  
  Outside of argument lists, it returns a [`Slip`](/type/Slip), which makes it flatten into the outer list. Inside [argument list](/language/list#Argument_list_(Capture)_context) [`Positional`s](/type/Positional) are turned into positional arguments and [`Associative`s](/type/Associative) are turned into named arguments.
  
  ## [prefix `+^`](#Operators "go to top of document")[§](#prefix_+^ "direct link")
  
  ```raku
  multi prefix:<+^>(Any --> Int:D)
  ```
  
  Integer bitwise negation operator: converts the number to binary using as many bytes as needed by the number plus one; flips all bits and returns the result assuming it is a [two's complement](https://en.wikipedia.org/wiki/Two%27s_complement) representation.
  
  ```raku
  say +^255; # OUTPUT: «-256␤»
  
  ```
  
  In this case, 255 is 11111111 and would need a single byte. We use the representation in bytes needed for this value plus one, converting it to 0000 0000 1111 1111. Bitwise negation turns it into 1111 1111 0000 0000 and this is the representation in two's complement of -256, which is returned.
  
  ```raku
  say +^1;        # OUTPUT: «-2␤»
  say +^(-256);   # OUTPUT: «255␤»
  
  ```
  
  Negative numbers are assumed to be represented as two's complements, and thus circle back to the original number.
  
  ## [prefix `~^`](#Operators "go to top of document")[§](#prefix_~^ "direct link")
  
  Coerces the argument to a non-variable-encoding string buffer type (e.g. `buf8`, `buf16`, `buf32`) and then flips each bit in that buffer.
  
  Please note that this has not yet been implemented.
  
  ## [prefix `?^`](#Operators "go to top of document")[§](#prefix_?^ "direct link")
  
  ```raku
  multi prefix:<?^>(Mu --> Bool:D)
  ```
  
  Boolean bitwise negation operator: Coerces the argument to [`Bool`](/type/Bool) and then does a bit flip, which makes it the same as `prefix:<!>`.
  
  ## [prefix `^`](#Operators "go to top of document")[§](#prefix_^ "direct link")
  
  ```raku
  multi prefix:<^>(Any --> Range:D)
  ```
  
  *upto* operator.
  
  Coerces the argument to [`Numeric`](/type/Numeric), and generates a range from 0 up to (but excluding) the argument.
  
  ```raku
  say ^5;         # OUTPUT: «0..^5␤»
  for ^5 { }      # 5 iterations
  ```
  
  # [Dotty infix precedence](#Operators "go to top of document")[§](#Dotty_infix_precedence "direct link")
  
  These operators are like their Method Postfix counterparts, but require surrounding whitespace (before and/or after) to distinguish them.
  
  ## [infix `.=`](#Operators "go to top of document")[§](#infix_.= "direct link")
  
  Calls the right-side method on the value in the left-side container, replacing the resulting value in the left-side container.
  
  In most cases, this behaves identically to the postfix mutator, but the precedence is lower:
  
  ```raku
  my $a = -5;
  say ++$a.=abs;
  # OUTPUT: «6␤»
  
  ```
  
  ```raku
  say ++$a .= abs;
  # OUTPUT: «Cannot modify an immutable Int␤
  #           in block <unit> at <tmp> line 1␤␤»
  
  ```
  
  ## [infix `.`](#Operators "go to top of document")[§](#infix_. "direct link")
  
  Calls the following method (whose name must be alphabetic) on the left-side invocant.
  
  Note that the infix form of the operator has a slightly lower precedence than postfix `.meth`.
  
  ```raku
  say -5.abs;      # like: -(5.abs)
  # OUTPUT: «-5␤»
  say -5 . abs;    # like: (-5) . abs
  # OUTPUT: «5␤»
  say -5 .abs;     # following whitespace is optional
  # OUTPUT: «5␤»
  ```
  
  # [Multiplicative precedence](#Operators "go to top of document")[§](#Multiplicative_precedence "direct link")
  
  ## [infix `*`](#Operators "go to top of document")[§](#infix_* "direct link")
  
  ```raku
  multi infix:<*>(Any, Any --> Numeric:D)
  ```
  
  Multiplication operator.
  
  Coerces both arguments to [`Numeric`](/type/Numeric) and multiplies them. The result is of the wider type. See [`Numeric`](/type/Numeric) for details.
  
  ## [infix `/`](#Operators "go to top of document")[§](#infix_/ "direct link")
  
  ```raku
  multi infix:</>(Any, Any --> Numeric:D)
  ```
  
  Division operator.
  
  Coerces both argument to [`Numeric`](/type/Numeric) and divides the left through the right number. Division of [`Int`](/type/Int) values returns [`Rat`](/type/Rat), otherwise the "wider type" rule described in [`Numeric`](/type/Numeric) holds.
  
  Note there is also [`div`](#infix_div) for [`Int`](/type/Int) division.
  
  ## [infix `div`](#Operators "go to top of document")[§](#infix_div "direct link")
  
  ```raku
  multi infix:<div>(Int:D, Int:D --> Int:D)
  ```
  
  Integer division operator. Rounds down.
  
  Note there is also [`/`](#infix_/) for [`Numeric`](/type/Numeric) division.
  
  ## [infix `%`](#Operators "go to top of document")[§](#infix_% "direct link")
  
  ```raku
  multi infix:<%>($x, $y --> Numeric:D)
  ```
  
  Modulo operator. Coerces to [`Numeric`](/type/Numeric) first.
  
  Generally the following identity holds:
  
  ```raku
  my ($x, $y) = 1,2;
  $x % $y == $x - floor($x / $y) * $y
  ```
  
  Note there is also [`mod`](#infix_%) for [`Int`](/type/Int) modulo.
  
  ## [infix `%%`](#Operators "go to top of document")[§](#infix_%% "direct link")
  
  ```raku
  multi infix:<%%>($a, $b --> Bool:D)
  ```
  
  Divisibility operator. Returns `True` if `$a % $b == 0`.
  
  ## [infix `mod`](#Operators "go to top of document")[§](#infix_mod "direct link")
  
  ```raku
  multi infix:<mod>(Int:D $a, Int:D $b --> Int:D)
  ```
  
  Integer modulo operator. Returns the remainder of an integer modulo operation.
  
  Note there is also [`%`](#infix_%) for [`Numeric`](/type/Numeric) modulo.
  
  ## [infix `+&`](#Operators "go to top of document")[§](#infix_+& "direct link")
  
  ```raku
  multi infix:<+&>($a, $b --> Int:D)
  ```
  
  Numeric bitwise *AND* operator. Coerces both arguments to [`Int`](/type/Int) and does a bitwise *AND* operation assuming two's complement.
  
  ## [infix `+<`](#Operators "go to top of document")[§](#infix_+< "direct link")
  
  ```raku
  multi infix:«+<»($a, $b --> Int:D)
  ```
  
  Integer bit shift to the left.
  
  ## [infix `+>`](#Operators "go to top of document")[§](#infix_+> "direct link")
  
  ```raku
  multi infix:«+>»($a, $b --> Int:D)
  ```
  
  Integer bit shift to the right.
  
  ## [infix `~&`](#Operators "go to top of document")[§](#infix_~& "direct link")
  
  Coerces each argument to a non-variable-encoding string buffer type (e.g. `buf8`, `buf16`, `buf32`) and then performs a numeric bitwise AND on corresponding integers of the two buffers, padding the shorter buffer with zeroes.
  
  ## [infix `~<`](#Operators "go to top of document")[§](#infix_~< "direct link")
  
  Coerces the left argument to a non-variable-encoding string buffer type (e.g. `buf8`, `buf16`, `buf32`) and then performs a numeric bitwise left shift on the bits of the buffer.
  
  Please note that this has not yet been implemented.
  
  ## [infix `~>`](#Operators "go to top of document")[§](#infix_~> "direct link")
  
  Coerces the left argument to a non-variable-encoding string buffer type (e.g. `buf8`, `buf16`, `buf32`) and then performs a numeric bitwise right shift on the bits of the buffer.
  
  Please note that this has not yet been implemented.
  
  ## [infix `?&`](#Operators "go to top of document")[§](#infix_?& "direct link")
  
  ```raku
  multi infix:<?&>(Mu $x = Bool::True)
  multi infix:<?&>(Mu \a, Mu \b)
  ```
  
  Boolean logical AND operator. Coerces the argument(s) to [`Bool`](/type/Bool) and performs logical AND on it(them): it will return True if and only if both arguments are True. On a single argument it behaves as identity, returning the coerced value.
  
  ## [infix `gcd`](#Operators "go to top of document")[§](#infix_gcd "direct link")
  
  ```raku
  multi infix:<gcd>($a, $b --> Int:D)
  ```
  
  Coerces both arguments to [`Int`](/type/Int) and returns the greatest common divisor. If one of its arguments is 0, the other is returned (when both arguments are 0, the operator returns 0).
  
  ## [infix `lcm`](#Operators "go to top of document")[§](#infix_lcm "direct link")
  
  ```raku
  multi infix:<lcm>($a, $b --> Int:D)
  ```
  
  Coerces both arguments to [`Int`](/type/Int) and returns the least common multiple; that is, the smallest integer that is evenly divisible by both arguments.
  
  # [Additive precedence](#Operators "go to top of document")[§](#Additive_precedence "direct link")
  
  ## [infix `+`](#Operators "go to top of document")[§](#infix_+ "direct link")
  
  ```raku
  multi infix:<+>($a, $b --> Numeric:D)
  ```
  
  Addition operator: Coerces both arguments to [`Numeric`](/type/Numeric) and adds them. From version 6.d it works also on [`Duration`](/type/Duration), [`DateTime`](/type/DateTime) and [`Real`](/type/Real) types.
  
  ## [infix `-`](#Operators "go to top of document")[§](#infix_- "direct link")
  
  ```r