Demonstrating custom Swift operators. Including prefix, postfix, infix, and compound assignment operators. Related blogpost: Custom Operators in Swift with practical code examples.
- Infix operator
- Prefix operator
- Postfix operator
- Compound Assignment Operator
- Emoji Operators
If you have a great example of a custom operator you think we can all benefit from, feel free to open a PR with a new Playground page.
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Custom Swift Operators is available under the MIT license, and uses source code from open source projects. See the LICENSE file for more info.
This project is originally created by Antoine van der Lee based on experienced from developing Collect by WeTransfer and writing posts at SwiftLee. A detailed explanation of custom operators can be found on his blog Custom Operators in Swift with practical code examples.