Course of Raku / Advanced / Operators / Types of Raku operators
Quiz — Operator categories
In the expression @a[0], what category does the
[0] subscript belong to?
| 0 | postfix |
| 1 | postcircumfix |
| 0 | circumfix |
| 0 | infix |
A subscript surrounds its content with brackets and follows
a term (here @a), which makes it a postcircumfix operator.
A plain postfix (like ++) takes no surrounding brackets,
and a circumfix (like the array constructor [1, 2, 3])
surrounds but does not follow a term.