Anonymous function: Difference between revisions

Content deleted Content added
Uses: Added currying
Currying: Also does a closure
Line 91:
 
While the use of anonymous functions is perhaps not common with currying it still can be used. In the above example, the function divisor generates functions with a specified divisor. The functions half and third curry the divide function with a fixed divisor.
 
(It just so happens that the divisor function forms a closure as well as curries by binding the "d" variable.)
 
==List of languages==