Anonymous function: Difference between revisions

Content deleted Content added
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
Filled in 1 bare reference(s) with reFill 2
Line 986:
 
=== Java ===
[[Java (programming language)|Java]] supports anonymous functions, named ''Lambda Expressions'', starting with [[Java 8|JDK 8]].<ref>{{citeCite web|url=http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html|title=What's New in JDK 8}}</ref>
 
A lambda expression consists of a comma separated list of the formal parameters enclosed in parentheses, an arrow token (<code>-></code>), and a body. Data types of the parameters can always be omitted, as can the parentheses if there is only one parameter. The body can consist of one statement or a statement block.<ref name="JavaLambda" />