Composing Pure Function Pipelines
Chain transformations predictably.
What Is a Pure Function
A pure function returns the same output for the same input and changes nothing outside itself. Predictable and easy to test. ✨
int double(int x) => x * 2; // pureSpotting Side Effects
A function with side effects touches the outside world, like printing or mutating a global. Those are harder to reason about.
var log = [];
void impure(int x) => log.add(x); // side effectAll lessons in this course
- Higher-Order Functions and Currying
- fold, reduce, and expand
- Lazy Iterables and Generators With sync*
- Composing Pure Function Pipelines