A Tour of Morfa

User-defined operators

Morfa has extensive support for user-defined operators.

You may overload existing operators, such as +, and define new ones. Operator names may be built from symbols such as * and @ or from letters and may use Unicode characters.

Operators may be prefix, infix or postfix.

You may also overload indexing brackets such as [] or () and their assignment variants []= or ()= and you may define new indexing and assignment bracket operators using a subset of Unicode bracket characters

The so-called surrounding bracket operators may be defined and overloaded to allow operator calls like {1, 2.3, "Some text"}.