Operators are Functions
suggest changeOperators such as +, -, and ?? are functions named with symbols rather than letters. They are invoked differently from ordinary functions:
- Prefix:
-x - Infix:
x + y - Postfix:
x++(removed in Swift 3, along with--)
You can read more about basic operators and advanced operators in The Swift Programming Language.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents