Content deleted Content added
m Revise Ada support, citate |
→Uses: Tried to cover the usage pros and cons. Simplified by removed the weird meaningless phrase "more-generic". Qualified the "more efficient" with in dynamic programming language |
||
Line 14:
Anonymous functions can be used for containing functionality that need not be named and possibly for short-term use. Some notable examples include [[Closure (computer science)|closures]] and [[currying]].
The use of anonymous functions is a matter of style. Using them is never the only way to solve a problem; each anonymous function could instead be defined as a named function and called by name.
In some programming languages, anonymous functions are commonly implemented for very specific purposes such as binding events to callbacks or instantiating the function for particular values, which may be more efficient in a [[Dynamic programming language]], more readable, and less error-prone than calling a
The following examples are written in Python 3.
|