By designing your code for functional composition, you can keep it simple and targeted, making it easier to implement, understand, and test it. More sophisticated logic can be modeled by composing various building blocks of basic functionality — extension methods for collections, in the case of this post.
An operator function in Swift can be passed to a higher-order function like any other. Here are some examples where that comes in handy.
This post summarizes various language features of Swift that allow you to concisely define closure expressions, namely type inference, shorthand argument names, trailing closure syntax, and operator functions.
Swift allows you to define custom operators to extend the language. Read about how to implement a forward pipe operator that passes values through a chain of transformation functions.
Get started with F# by solving math problems from Project Euler. You'll learn about functional programming concepts along the way.