The "Recursive types and folds" series
In this series, we’ll look at recursive types and how to use them, and on the way, we’ll look at catamorphisms, tail recursion, the difference between left and right folds, and more.
-
1. Introduction to recursive types
Don't fear the catamorphism... -
2. Catamorphism examples
Applying the rules to other domains -
3. Introducing Folds
Threading state through a recursive data structure -
4. Understanding Folds
Recursion vs. iteration -
5. Generic recursive types
Implementing a domain in three ways -
6. Trees in the real world
Examples using databases, JSON and error handling