term term:<>

Documentation for term term:<> assembled from the following types:

language documentation Syntax

From Syntax

(Syntax) term term:<>

You can use term:<> to introduce new terms, which is handy for introducing constants that defy the rules of normal identifiers:

use Testplan 1constant &term:<👍> = &ok.assuming(True);
👍
# OUTPUT: «1..1␤ok 1 - ␤» 

But terms don't have to be constant: you can also use them for functions that don't take any arguments, and force the parser to expect an operator after them. For instance:

sub term:<dice> { (1..6).pick };
say dice + dice;

can print any number between 2 and 12.

If instead we had declared dice as a regular

sub dice() {(1...6).pick }

, the expression dice + dice would be parsed as dice(+(dice())), resulting in an error since sub dice expects zero arguments.