Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. In functional programming, an anamorphism is a kind of generic function which can corecursively construct a result of a certain type and which is parameterized by functions that determining what the next single step of the construction is. The term comes from (upwards) + morphism a ...Full description
Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. In functional programming, an anamorphism is a kind of generic function which can corecursively construct a result of a certain type and which is parameterized by functions that determining what the next single step of the construction is. The term comes from (upwards) + morphism and the concept has its grounding in category theory. The concept of anamorphism generalizes the list-producing unfold functions to arbitrary algebraic data types that can be described as final coalgebras. In fact, the terms 'anamorphism' and "unfold" (as a noun) are often used interchangeably. Anamorphisms, which are co-recursive, are dual to catamorphisms, which are recursive, just as unfolds are dual to folds.