<s>
The	O
Joy	B-Application
programming	I-Application
language	I-Application
in	O
computer	B-General_Concept
science	I-General_Concept
is	O
a	O
purely	O
functional	B-Language
programming	I-Language
language	I-Language
that	O
was	O
produced	O
by	O
Manfred	B-Application
von	I-Application
Thun	I-Application
of	O
La	O
Trobe	O
University	O
in	O
Melbourne	O
,	O
Australia	O
.	O
</s>
<s>
Joy	O
is	O
based	O
on	O
composition	B-Application
of	O
functions	O
rather	O
than	O
lambda	B-Language
calculus	I-Language
.	O
</s>
<s>
It	O
has	O
turned	O
out	O
to	O
have	O
many	O
similarities	O
to	O
Forth	B-Application
,	O
due	O
not	O
to	O
design	O
but	O
to	O
an	O
independent	O
evolution	O
and	O
convergence	O
.	O
</s>
<s>
It	O
was	O
also	O
inspired	O
by	O
the	O
function-level	B-Application
programming	I-Application
style	I-Application
of	O
John	O
Backus	O
's	O
FP	B-Language
.	O
</s>
<s>
Joy	O
is	O
unusual	O
among	O
functional	B-Language
programming	I-Language
languages	I-Language
(	O
except	O
for	O
function-level	B-Application
programming	I-Application
languages	O
and	O
some	O
esoteric	O
ones	O
,	O
such	O
as	O
Unlambda	B-Language
)	O
in	O
its	O
lack	O
of	O
a	O
lambda	B-Language
operator	O
,	O
and	O
therefore	O
lack	O
of	O
formal	O
parameters	O
.	O
</s>
<s>
To	O
illustrate	O
this	O
with	O
a	O
common	O
example	O
,	O
here	O
is	O
how	O
the	O
square	O
function	O
might	O
be	O
defined	O
in	O
an	O
imperative	B-Application
programming	I-Application
language	I-Application
(	O
C	B-Language
)	O
:	O
</s>
<s>
In	O
a	O
functional	B-Language
language	I-Language
(	O
Scheme	B-Language
)	O
,	O
the	O
same	O
function	O
could	O
be	O
defined	O
:	O
</s>
<s>
In	O
Joy	O
,	O
everything	O
is	O
a	O
function	O
that	O
takes	O
a	O
stack	B-Application
as	O
an	O
argument	O
and	O
returns	O
a	O
stack	B-Application
as	O
a	O
result	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
numeral	O
'	O
5	O
 '	O
does	O
not	O
represent	O
an	O
integer	O
constant	O
,	O
but	O
instead	O
a	O
short	O
program	O
that	O
pushes	O
the	O
number	O
5	O
onto	O
the	O
stack	B-Application
.	O
</s>
<s>
The	O
dup	O
operator	O
simply	O
duplicates	O
the	O
top	O
element	O
of	O
the	O
stack	B-Application
by	O
pushing	O
a	O
copy	O
of	O
it	O
.	O
</s>
<s>
The	O
*	O
operator	O
pops	O
two	O
numbers	O
off	O
the	O
stack	B-Application
and	O
pushes	O
their	O
product	O
.	O
</s>
<s>
So	O
the	O
square	O
function	O
makes	O
a	O
copy	O
of	O
the	O
top	O
element	O
,	O
and	O
then	O
multiplies	O
the	O
two	O
top	O
elements	O
of	O
the	O
stack	B-Application
,	O
leaving	O
the	O
square	O
of	O
the	O
original	O
top	O
element	O
at	O
the	O
top	O
of	O
the	O
stack	B-Application
,	O
with	O
no	O
need	O
for	O
a	O
formal	O
parameter	O
.	O
</s>
<s>
This	O
makes	O
Joy	O
concise	O
,	O
as	O
illustrated	O
by	O
this	O
definition	O
of	O
quicksort	B-Algorithm
:	O
</s>
<s>
"	O
binrec	O
"	O
is	O
one	O
of	O
Joy	O
's	O
many	O
recursive	O
combinators	B-Application
,	O
implementing	O
binary	O
recursion	O
.	O
</s>
<s>
It	O
expects	O
four	O
quoted	O
programs	O
on	O
top	O
of	O
the	O
stack	B-Application
which	O
represent	O
:	O
</s>
<s>
In	O
Joy	O
,	O
the	O
meaning	O
function	O
is	O
a	O
homomorphism	O
from	O
the	O
syntactic	O
monoid	O
onto	O
the	O
semantic	B-Application
monoid	O
.	O
</s>
<s>
That	O
is	O
,	O
the	O
syntactic	O
relation	O
of	O
concatenation	O
of	O
symbols	O
maps	O
directly	O
onto	O
the	O
semantic	B-Application
relation	O
of	O
composition	B-Application
of	O
functions	O
.	O
</s>
<s>
It	O
is	O
a	O
homomorphism	O
rather	O
than	O
an	O
isomorphism	O
,	O
because	O
it	O
is	O
onto	O
but	O
not	O
one-to-one	B-Algorithm
;	O
that	O
is	O
,	O
no	O
symbol	O
has	O
more	O
than	O
one	O
meaning	O
,	O
but	O
some	O
sequences	O
of	O
symbols	O
have	O
the	O
same	O
meaning	O
(	O
e.g.	O
</s>
<s>
Joy	O
is	O
a	O
concatenative	B-Language
programming	I-Language
language	I-Language
:	O
"	O
The	O
concatenation	O
of	O
two	O
programs	O
denotes	O
the	O
composition	B-Application
of	O
the	O
functions	O
denoted	O
by	O
the	O
two	O
programs	O
"	O
.	O
</s>
<s>
Its	O
library	O
routines	O
mirror	O
those	O
of	O
ISO	O
C	B-Language
,	O
though	O
the	O
current	O
implementation	O
is	O
not	O
easily	O
extensible	O
with	O
functions	O
written	O
in	O
C	B-Language
.	O
</s>
