Anonymous function

This is an old revision of this page, as edited by Brighterorange (talk | contribs) at 20:45, 9 February 2007 (programming languages are not sets, anyway, many languages do not have lexically scoped higher order functions). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

An anonymous function is a function (or a subroutine) defined, and possibly called, without being bound to a name. In the lambda calculus, all functions are anonymous. The Y combinator can be utilised in these circumstances to provide anonymous recursion. Certain programming languages also provide support for both named and anonymous functions. The lambda calculus without anonymous function definition forms a combinatory logic.

Some object-oriented programming languages have anonymous classes, which are a similar concept. Java is such a language.