Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Raku Programming/Operator Overloading

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

There are only 5 types of operators: infix , prefix , postfix , circumfix and postcircumfix . You can declare a new operator like this: sub postfix:<!>(Int $n!) { [*] 1..$n } say 5!; # prints 120 The above, as you can see, declares an operator '!' for calculating factorial of a Integer.