<s>
Refal	B-Language
(	O
"	O
Recursive	O
functions	O
algorithmic	O
language	O
"	O
;	O
)	O
"	O
is	O
a	O
functional	B-Language
programming	I-Language
language	I-Language
oriented	O
toward	O
symbolic	O
computations	O
"	O
,	O
including	O
"	O
string	B-Language
processing	I-Language
,	O
language	O
translation	O
,	O
 [ and ] 	O
artificial	B-Application
intelligence	I-Application
"	O
.	O
</s>
<s>
Refal	B-Language
was	O
intended	O
to	O
combine	O
mathematical	O
simplicity	O
with	O
practicality	O
for	O
writing	O
large	O
and	O
sophisticated	O
programs	O
.	O
</s>
<s>
One	O
of	O
the	O
first	O
functional	B-Language
programming	I-Language
languages	I-Language
to	O
do	O
so	O
,	O
and	O
unlike	O
Lisp	B-Language
of	O
its	O
time	O
,	O
Refal	B-Language
is	O
based	O
on	O
pattern	B-Language
matching	I-Language
.	O
</s>
<s>
Its	O
pattern	B-Language
matching	I-Language
works	O
in	O
conjunction	O
with	O
term	O
rewriting	O
.	O
</s>
<s>
The	O
basic	O
data	B-General_Concept
structure	I-General_Concept
of	O
Lisp	B-Language
and	O
Prolog	B-Language
is	O
a	O
linear	O
list	O
built	O
by	O
cons	B-Protocol
operation	I-Protocol
in	O
a	O
sequential	O
manner	O
,	O
thus	O
with	O
O(n )	O
access	O
to	O
list	O
's	O
nth	O
element	O
.	O
</s>
<s>
Refal	B-Language
's	O
lists	O
are	O
built	O
and	O
scanned	O
from	O
both	O
ends	O
,	O
with	O
pattern	B-Language
matching	I-Language
working	O
for	O
nested	O
lists	O
as	O
well	O
as	O
the	O
top-level	O
one	O
.	O
</s>
<s>
In	O
effect	O
,	O
the	O
basic	O
data	B-General_Concept
structure	I-General_Concept
of	O
Refal	B-Language
is	O
a	O
tree	B-Application
rather	O
than	O
a	O
list	O
.	O
</s>
<s>
This	O
gives	O
freedom	O
and	O
convenience	O
in	O
creating	O
data	B-General_Concept
structures	I-General_Concept
while	O
using	O
only	O
mathematically	O
simple	O
control	O
mechanisms	O
of	O
pattern	B-Language
matching	I-Language
and	O
substitution	O
.	O
</s>
<s>
Refal	B-Language
also	O
includes	O
a	O
feature	O
called	O
the	O
freezer	O
to	O
support	O
efficient	O
partial	O
evaluation	O
.	O
</s>
<s>
Refal	B-Language
can	O
be	O
applied	O
to	O
the	O
processing	O
and	O
transformation	O
of	O
tree	B-Application
structures	O
,	O
similarly	O
to	O
XSLT	B-Application
.	O
</s>
<s>
A	O
Refal	B-Language
Hello	O
World	O
example	O
is	O
shown	O
below	O
.	O
</s>
<s>
One	O
could	O
think	O
of	O
expressions	O
in	O
the	O
function	O
bodies	O
as	O
function	O
"	O
calls	O
"	O
in	O
Lisp-like	O
syntax	O
.	O
</s>
<s>
If	O
the	O
result	O
of	O
a	O
function	O
application	O
includes	O
a	O
subexpression	O
in	O
angle	O
brackets	O
(	O
as	O
it	O
will	O
after	O
the	O
third	O
sentence	O
of	O
our	O
example	O
is	O
applied	O
)	O
,	O
the	O
result	O
is	O
further	O
processed	O
by	O
Refal	B-Language
by	O
invoking	O
the	O
function	O
identified	O
by	O
the	O
first	O
symbol	O
in	O
the	O
brackets	O
.	O
</s>
<s>
An	O
important	O
property	O
of	O
Refal	B-Language
is	O
that	O
all	O
functions	O
in	O
refal	B-Language
are	O
single	O
argument	O
.	O
</s>
