Anonymous function

In computer science and mathematics, an anonymous function is a function with no name. Usually, a function is written like: formula_1. It can be written anonymously as formula_2. Anonymous functions exist in most functional programming languages and most other programming languages where functions are values.
Examples in some programming languages.
Each of these examples show a nameless function that multiplies two numbers.
Python.
Uncurried (not curried):
Curried:
When given two numbers:
»&gt;(lambda x: (lambda y: x * y)) (3) (4)
12
Haskell.
Curried:
\x -&gt; \y -&gt; x * y
\x y -&gt; x * y
When given two numbers:
»&gt; (\x -&gt; \y -&gt; x * y) 3 4
12
The function can also be written in point-free (tacit) style:
Standard ML.
Uncurried:
fn (x, y) =&gt; x * y
Curried:
fn x =&gt; fn y =&gt; x * y
Point-free:
JavaScript.
Uncurried:
(x, y) =&gt; x * y
function (x, y) {
 return x * y;
Curried:
x =&gt; y =&gt; x * y
function (x) {
 return function (y) {
 return x * y;
Scheme.
Uncurried:
Curried:
Point-free:&lt;syntaxhighlight&gt;
&lt;/syntaxhighlight&gt;
C++ 11.
Uncurried:
[](int x, int y)-&gt;int
 return x * y;
Curried:
[](int x)
 return [=](int y)-&gt;int
 return x * y;
};
C++ Boost.
Uncurried:
_1 * _2
Note: What you need to write boost lambda is to include &lt;boost/lambda/lambda.hpp&gt; header file, and using namespace boost::lambda, i.e.
using namespace boost::lambda;