Quick actions

cmd+k|ctrl+k

Navigation

Languages

Redefining Operator Precedence

Snippet info

Language

Raku

Visibility

public

Author

xliff

Created

2021-05-27T10:37:28.936355Z

Updated

2021-05-27T10:44:51.629657Z

sub newScopeExpression {
  proto sub infix:<+>(\a, \b) is tighter(&infix:<*>) { * }

  multi sub infix:<+>(\a, \b) {
    say "A: { a } / B: { b }";
    use nqp;
    nqp::add_I(a, b, Int);
  }

  say 2 + 2 * 4;
}

newScopeExpression
INFO