Function Composition and Pipelines
Building data pipelines by composing small functions into larger transformations.
Welcome
Function composition combines small, focused functions into larger transformations. It's the essence of functional programming — build complex behaviour from simple parts.
Manual Composition
```swift
func double(_ n: Int) -> Int { n * 2 }
func addOne(_ n: Int) -> Int { n + 1 }
let result = addOne(double(5)) // 11
```
All lessons in this course
- Pure Functions and Side-Effect-Free Design
- Higher-Order Functions: map, flatMap, compactMap
- Function Composition and Pipelines
- Lazy Sequences for Efficiency