anonymous function
compound.compound. a small piece of computer code that does a job but does not have a name. You use it for quick tasks where you only need the code once.
compound. a function definition that is not bound to an identifier. Often used as an argument passed to higher-order functions or for immediate execution in functional programming contexts.
The developer used an anonymous function to sort the list.
Instead of writing a separate named method, she passed an anonymous function directly into the filter method to process the data.
In JavaScript, anonymous functions are frequently employed as callbacks to ensure that specific logic executes only after an asynchronous operation, such as a network request, has successfully completed.
Derived from the Ancient Greek 'anōnumos', meaning without a name, combined with the mathematical sense of 'function'. The term gained prominence in computer science through the development of Lisp and the implementation of lambda calculus.
Etymology adapted from Wiktionary, available under CC BY-SA 4.0.
Commonly referred to as a 'lambda' in many programming languages.
Last updated July 22, 2026