An Introduction to Mendler-style (Co)Recursion

Stefan Knudsen

Recursive types, and their dual, corecursive types, allow us to define arbitrarily large and infinitely large data structures, respectively. There are many ways to implement recursive and corecursive types, including (co)iteration, primitive (co)recursion, general (co)recursion, and Mendler-style (co)recursion. We give an overview of these techniques, compare them with one another, and explain how these tie into my thesis, "Indexed Reactive Programming".