Lazy Iterables and Generators With sync*
Produce values on demand.
What Lazy Means
A lazy iterable does not compute its values until you actually ask for them. Work happens on demand, not all at once. 🦥
Iterables Are Lazy
Methods like map and where return a lazy Iterable. Nothing runs until you iterate or call toList.
var it = [1, 2, 3].map((n) {
print('seen $n');
return n * 2;
});All lessons in this course
- Higher-Order Functions and Currying
- fold, reduce, and expand
- Lazy Iterables and Generators With sync*
- Composing Pure Function Pipelines