<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
partial	B-Application
application	I-Application
(	O
or	O
partial	B-Application
function	I-Application
application	I-Application
)	O
refers	O
to	O
the	O
process	O
of	O
fixing	O
a	O
number	O
of	O
arguments	O
to	O
a	O
function	O
,	O
producing	O
another	O
function	O
of	O
smaller	O
arity	O
.	O
</s>
<s>
Note	O
that	O
the	O
result	O
of	O
partial	B-Application
function	I-Application
application	I-Application
in	O
this	O
case	O
is	O
a	O
function	O
that	O
takes	O
two	O
arguments	O
.	O
</s>
<s>
Partial	B-Application
application	I-Application
is	O
sometimes	O
incorrectly	O
called	O
currying	B-Application
,	O
which	O
is	O
a	O
related	O
,	O
but	O
distinct	O
concept	O
.	O
</s>
<s>
Intuitively	O
,	O
partial	B-Application
function	I-Application
application	I-Application
says	O
"	O
if	O
you	O
fix	O
the	O
first	O
arguments	O
of	O
the	O
function	O
,	O
you	O
get	O
a	O
function	O
of	O
the	O
remaining	O
arguments	O
"	O
.	O
</s>
<s>
The	O
practical	O
motivation	O
for	O
partial	B-Application
application	I-Application
is	O
that	O
very	O
often	O
the	O
functions	O
obtained	O
by	O
supplying	O
some	O
but	O
not	O
all	O
of	O
the	O
arguments	O
to	O
a	O
function	O
are	O
useful	O
;	O
for	O
example	O
,	O
many	O
languages	O
have	O
a	O
function	O
or	O
operator	O
similar	O
to	O
plus_one	O
.	O
</s>
<s>
Partial	B-Application
application	I-Application
makes	O
it	O
easy	O
to	O
define	O
these	O
functions	O
,	O
for	O
example	O
by	O
creating	O
a	O
function	O
that	O
represents	O
the	O
addition	O
operator	O
with	O
1	O
bound	O
as	O
its	O
first	O
argument	O
.	O
</s>
<s>
In	O
languages	O
such	O
as	O
ML	B-Language
,	O
Haskell	B-Language
and	O
F#	O
,	O
functions	O
are	O
defined	O
in	O
curried	B-Application
form	I-Application
by	O
default	O
.	O
</s>
<s>
Supplying	O
fewer	O
than	O
the	O
total	O
number	O
of	O
arguments	O
is	O
referred	O
to	O
as	O
partial	B-Application
application	I-Application
.	O
</s>
<s>
In	O
languages	O
with	O
first-class	B-Application
functions	I-Application
,	O
one	O
can	O
define	O
curry	B-Application
,	O
uncurry	B-Application
and	O
papply	B-Application
to	O
perform	O
currying	B-Application
and	O
partial	B-Application
application	I-Application
explicitly	O
.	O
</s>
<s>
This	O
might	O
incur	O
a	O
greater	O
run-time	O
overhead	O
due	O
to	O
the	O
creation	O
of	O
additional	O
closures	B-Language
,	O
while	O
Haskell	B-Language
can	O
use	O
more	O
efficient	O
techniques	O
.	O
</s>
<s>
Scala	B-Application
implements	O
optional	O
partial	B-Application
application	I-Application
with	O
placeholder	O
,	O
e.g.	O
</s>
<s>
Scala	B-Application
also	O
supports	O
multiple	O
parameter	O
lists	O
as	O
currying	B-Application
,	O
e.g.	O
</s>
<s>
Clojure	B-Language
implements	O
partial	B-Application
application	I-Application
using	O
the	O
partial	O
function	O
defined	O
in	O
its	O
core	O
library	O
.	O
</s>
<s>
The	O
C++	B-Language
standard	O
library	O
provides	O
bind( function	O
,	O
args	O
..	O
)	O
to	O
return	O
a	O
function	B-Language
object	I-Language
that	O
is	O
the	O
result	O
of	O
partial	B-Application
application	I-Application
of	O
the	O
given	O
arguments	O
to	O
the	O
given	O
function	O
.	O
</s>
<s>
In	O
Java	B-Language
,	O
MethodHandle.bindTo	O
partially	O
applies	O
a	O
function	O
to	O
its	O
first	O
argument	O
.	O
</s>
<s>
Alternatively	O
,	O
since	O
Java	B-Language
8	O
,	O
lambdas	O
can	O
be	O
used	O
:	O
</s>
<s>
In	O
Raku	B-Application
,	O
the	O
method	O
creates	O
a	O
new	O
function	O
with	O
fewer	O
parameters	O
.	O
</s>
<s>
The	O
Python	B-Language
standard	O
library	O
module	O
functools	O
includes	O
the	O
partial	O
function	O
,	O
allowing	O
positional	O
and	O
named	O
argument	O
bindings	O
,	O
returning	O
a	O
new	O
function	O
.	O
</s>
<s>
In	O
XQuery	B-Language
,	O
an	O
argument	O
placeholder	O
(	O
?	O
)	O
</s>
<s>
is	O
used	O
for	O
each	O
non-fixed	O
argument	O
in	O
a	O
partial	B-Application
function	I-Application
application	I-Application
.	O
</s>
<s>
papply	B-Application
(((a b )	O
→	O
c	O
)	O
a	O
)	O
→	O
(	O
b	O
→	O
c	O
)	O
=	O
λ(f, x )	O
.	O
</s>
<s>
curry	B-Application
((a b )	O
→	O
c	O
)	O
→	O
(	O
a	O
→	O
(	O
b	O
→	O
c	O
)	O
)	O
=	O
λf	O
.	O
</s>
<s>
uncurry	B-Application
(	O
a	O
→	O
(	O
b	O
→	O
c	O
)	O
)	O
→	O
((a b )	O
→	O
c	O
)	O
=	O
λf	O
.	O
</s>
<s>
Note	O
that	O
curry	B-Application
papply	B-Application
=	O
curry	B-Application
.	O
</s>
<s>
Partial	B-Application
application	I-Application
can	O
be	O
a	O
useful	O
way	O
to	O
define	O
several	O
useful	O
notions	O
in	O
mathematics	O
.	O
</s>
<s>
The	O
partial	B-Application
application	I-Application
of	O
the	O
cross	O
product	O
on	O
is	O
.	O
</s>
<s>
The	O
partial	B-Application
application	I-Application
gives	O
a	O
map	O
.	O
</s>
