VS.

# Anamorphism vs. Unfold

Published:
Views: 15
• Anamorphism

In computer programming, an anamorphism is a function that generates a sequence by repeated application of the function to its previous result. You begin with some value A and apply a function f to it to get B. Then you apply f to B to get C, and so on until some terminating condition is reached. The anamorphism is the function that generates the list of A, B, C, etc. You can think of the anamorphism as unfolding the initial value into a sequence.

The above layman's description can be stated more formally in category theory: the anamorphism of a coinductive type denotes the assignment of a coalgebra to its unique morphism to the final coalgebra of an endofunctor. These objects are used in functional programming as unfolds.

The categorical dual (aka opposite) of the anamorphism is the catamorphism.

Wikipedia
• Anamorphism (noun)

a generalization of the list-producing unfolds known from functional programming to arbitrary abstract data types that can be described as final coalgebras

• Unfold (verb)

To undo a folding.

"to unfold a map; to unfold a tablecloth; she unpacks the new dress and unfolds it carefully"

• Unfold (verb)

To turn out; to happen; to develop.

• Unfold (verb)

To reveal.

• Unfold (verb)

To open (anything covered or closed); to lay open to view or contemplation; to bring out in all the details, or by successive development.

"to unfold one's designs;"

"to unfold the principles of a science"

• Unfold (verb)

To release from a fold or pen.

"to unfold sheep"

Wiktionary
• Anamorphism (noun)

A distorted image.

• Anamorphism (noun)

A gradual progression from one type to another, generally ascending.

• Unfold

To open the folds of; to expand; to spread out; as, to unfold a tablecloth.

• Unfold

To open, as anything covered or close; to lay open to view or contemplation; to bring out in all the details, or by successive development; to display; to disclose; to reveal; to elucidate; to explain; as, to unfold one's designs; to unfold the principles of a science.

• Unfold

To release from a fold or pen; as, to unfold sheep.

• Unfold (verb)

To open; to expand; to become disclosed or developed.

Webster Dictionary
• Anamorphism (noun)

the evolution of one type of organism from another by a long series of gradual changes

• Anamorphism (noun)

metamorphism that occurs deep under the earth's surface; changes simple minerals into complex minerals

• Anamorphism (noun)

a distorted projection or perspective; especially an image distorted in such a way that it becomes visible only when viewed in a special manner

• Unfold (verb)

develop or come to a promising stage;

"Youth blossomed into maturity"

• Unfold (verb)

open to the view;

"A walk through town will unfold many interesting buildings"

• Unfold (verb)

extend or stretch out to a greater or the full length;

"Unfold the newspaper"

"stretch out that piece of cloth"

"extend the TV antenna"

• Unfold (verb)

spread out or open from a closed or folded state;

"open the map"