Concept:

Unfold

Headline

The unfold function or the unfold transformation or an anamorphism

Details

See also the inverse notion of fold.


Concept:

Anamorphism


Concept:

Unfold function

Headline

a higher-order function for building a data structure

Synonym

Details

The application of a unfold function is an anamorphism.

Unfold is the dual of fold; see the fold function.


Concept:

Unfold transformation

Headline

The replacement of a reference to an abstraction by its definition

Details

For instance, consider the following logic program:

a(X) :- e(X), d(X).
e(X) :- b(X), c(X).

The first clause admits unfolding as follows:

a(X) :- b(X), c(X), d(X).

That is, the reference to e/1 in the body of a/1 is replaced by a suitably substituted body of e/1.

The inverse transformation is the fold transformation.

Synonyms


Concept:

Fold