Functional programming (FP) builds programs out of functions: small, predictable pieces that take input, return output, and don’t secretly change anything else. Swift isn’t a purely functional language, but it borrows many of FP’s best ideas: first-class functions, closures, value types, map and filter, and a strong preference for immutability with let.

You don’t have to go all in to benefit. Even a little functional thinking makes code easier to test, easier to reason about, and safer to run concurrently.

This guide follows the path of objc.io’s excellent book Functional Swift, from the core mindset to advanced abstractions. The articles develop original examples with executable checks, explain the limits of each technique, and finish with exercises that extend the design.

The series uses a Swift 5.7 baseline, released on September 12, 2022. Article dates run from November 2022 through June 2024; the examples use language features and APIs available by those dates. You can follow the sections in order or start with an everyday collection problem and return to the underlying ideas.

Article available Coming soon

1. The Functional Mindset

2. Everyday Functional Swift

3. Immutability and Testing

4. Functional Data Structures

5. Bigger Ideas

Up next

Data Structures & Algorithms

This guide grows with the blog: new articles are linked here as soon as they're published. Missing something? Let me know.

← Back to all roadmaps