O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom operators

Although composedFunction is less verbose than the non-functional version, it does not look great. Also, it is not easy to read as we need to read it inside out. Let's make this function simpler and more readable. One solution will be to define a custom operator that will be used instead of our composed function. In the following sections, we will examine what the standard operators are that are allowed to define a custom operator. We will also explore the custom operator definition technique. It is important to learn this concept as we will be using it in the rest of the book.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required