<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
and	O
in	O
particular	O
functional	B-Language
programming	I-Language
,	O
a	O
hylomorphism	O
is	O
a	O
recursive	O
function	O
,	O
corresponding	O
to	O
the	O
composition	B-Application
of	O
an	O
anamorphism	B-Application
(	O
which	O
first	O
builds	O
a	O
set	O
of	O
results	O
;	O
also	O
known	O
as	O
'	O
unfolding	O
 '	O
)	O
followed	O
by	O
a	O
catamorphism	B-Application
(	O
which	O
then	O
folds	B-Application
these	O
results	O
into	O
a	O
final	O
return	B-Language
value	I-Language
)	O
.	O
</s>
<s>
This	O
is	O
an	O
example	O
of	O
deforestation	B-Application
,	O
a	O
program	O
optimization	O
strategy	O
.	O
</s>
<s>
A	O
related	O
type	O
of	O
function	O
is	O
a	O
metamorphism	B-Application
,	O
which	O
is	O
a	O
catamorphism	B-Application
followed	O
by	O
an	O
anamorphism	B-Application
.	O
</s>
<s>
The	O
anamorphic	O
part	O
can	O
be	O
defined	O
in	O
terms	O
of	O
a	O
unary	O
function	O
defining	O
the	O
list	O
of	O
elements	O
in	O
by	O
repeated	O
application	O
(	O
"	O
unfolding	O
"	O
)	O
,	O
and	O
a	O
predicate	B-Algorithm
providing	O
the	O
terminating	O
condition	O
.	O
</s>
<s>
These	O
processes	O
arise	O
in	O
repeated	O
(	O
iterative	B-Algorithm
)	O
function	O
calls	O
.	O
</s>
<s>
In	O
the	O
previous	O
example	O
(	O
written	O
in	O
Haskell	B-Language
,	O
a	O
purely	O
functional	B-Language
programming	I-Language
language	I-Language
)	O
it	O
can	O
be	O
seen	O
that	O
this	O
function	O
,	O
applied	O
to	O
any	O
given	O
valid	O
input	O
,	O
will	O
generate	O
a	O
linear	O
call	O
tree	O
isomorphic	O
to	O
a	O
list	O
.	O
</s>
<s>
The	O
catamorphism	B-Application
,	O
then	O
,	O
is	O
the	O
calculation	O
of	O
the	O
product	O
of	O
the	O
elements	O
of	O
this	O
list	O
.	O
</s>
<s>
An	O
example	O
of	O
such	O
a	O
function	O
is	O
the	O
function	O
to	O
generate	O
the	O
nth	O
term	O
of	O
the	O
Fibonacci	B-Algorithm
sequence	I-Algorithm
.	O
</s>
<s>
This	O
time	O
,	O
the	O
anamorphism	B-Application
is	O
the	O
generation	O
of	O
the	O
call	O
tree	O
isomorphic	O
to	O
the	O
tree	O
with	O
leaf	B-Data_Structure
nodes	I-Data_Structure
0	O
,	O
1	O
,	O
1	O
,	O
0	O
,	O
1	O
and	O
the	O
catamorphism	B-Application
the	O
summation	O
of	O
these	O
leaf	B-Data_Structure
nodes	I-Data_Structure
.	O
</s>
