Course of Raku / Advanced / Operators / Types of Raku operators

Quiz — A word operator

The x operator repeats a string, so 'ab' x 3 gives 'ababab'. Sitting between its two operands, what category does x belong to?

1infix
0prefix
0postfix
0circumfix

What counts is position, not whether the operator is a symbol or a word. x sits between two operands, so it is an infix operator — just like + or ~, only spelled as a letter.

Course navigation

Quiz — Prefix or postfix   |   Review of operator behaviour