Higher-Order Functions and Currying
Pass, return, and partially apply functions.
Functions Are Values
In Dart, a function is just a value you can store in a variable. That single idea unlocks the whole world of functional patterns. 🎯
int square(int x) => x * x;
var op = square;
print(op(4)); // 16What Higher-Order Means
A higher-order function is one that takes a function as an argument or returns a function. You have already used them with list methods.
All lessons in this course
- Higher-Order Functions and Currying
- fold, reduce, and expand
- Lazy Iterables and Generators With sync*
- Composing Pure Function Pipelines