Anonymous Function

In computer programming, an anonymous function (also function constant, function literal, or lambda function) is a function (or a subroutine) defined, and possibly called, without being bound to an identifier. Anonymous functions are convenient to pass as an argument to a higher-order function and are ubiquitous in languages with first-class functions such as Haskell. Anonymous functions are a form of nested function, in that they allow access to the variable in the scope of the containing function (non-local variables). Unlike named nested functions, they cannot be recursive without the assistance of a fixpoint operator (also known as an anonymous fixpoint or anonymous recursion).

Anonymous functions originate in the work of Alonzo Church in his invention of the lambda calculus in 1936 (prior to electronic computers), in which all functions are anonymous. In several programming languages, anonymous functions are introduced using the keyword lambda, and anonymous functions are often referred to as lambda functions.

Anonymous functions have been a feature of programming languages since Lisp in 1958. An increasing number of modern programming languages support anonymous functions, and some notable mainstream languages have recently added support for them, the most widespread being JavaScript, C#, Ruby and PHP. Anonymous functions were added to C++ in C++11. Some object-oriented programming languages have anonymous classes, which are a similar concept, but do not support anonymous functions. Java is such a language (although support for lambdas is on the roadmap for Java 8).

Read more about Anonymous Function:  Uses, List of Languages

Famous quotes containing the words anonymous and/or function:

    I cannot say what poetry is; I know that our sufferings and our concentrated joy, our states of plunging far and dark and turning to come back to the world—so that the moment of intense turning seems still and universal—all are here, in a music like the music of our time, like the hero and like the anonymous forgotten; and there is an exchange here in which our lives are met, and created.
    Muriel Rukeyser (1913–1980)

    To look backward for a while is to refresh the eye, to restore it, and to render it the more fit for its prime function of looking forward.
    Margaret Fairless Barber (1869–1901)