Nick Arner

Notes from Functional Swift

Posted at — Nov 26, 2022

These are my notes from’s Functional Swift book. For a recent proejct, I’ve had to dive into a codebase that heavily makes use of functional programming in Swift; this book was helpful in getting a basic understanding of functional programming concepts in the world of Swift and iOS.

Characteristics of Functional Programming:

Functions are first-class values


Map / Filter / Reduce

Any vs Genertics

Value and Reference Types


Mutating Structs

extension Point Struct {
	mutating func fooBar() {
		x = 0
		y = 1



Types are isomorphic if we can convert between them w/o losing any information:

f: (A) -> B
g: (B) -> A

DSL’s (Domain Specific Languages)


​ separeate generation of data from usage


Lazy Sequences

Parser Combinators