Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
science, corecursion is a type of operation that is dual to recursion.
Corecursion is often used in conjunction with lazy evaluation.
Corecursion can produce both finite and infinite data structures as
result, and may employ self-referential data structures. Initial data
types can be defined as being the least fixpoint of some type equation;
the isomorphism is then given by an initial algebra. Dually, final data
types can be defined as being the greatest fixpoint of a type equation;
the isomorphism is then given by a final algebra. If the domain of
discourse is the category of sets and total functions, then final data
types may contain infinite, non-wellfounded values, whereas initial
types do not. On the other hand, if the domain of discourse is the
category of complete partial orders and continuous functions, which
corresponds roughly to the Haskell programming language, then final
types coincide with initial types, and the corresponding final and
initial algebras form an isomorphism.