Groovy defines a closure as an anonymous code block, along the lines of {a->a+1} , which can then be invoked at a later stage with an implicit or explicit function call. The ability to pass around functions has existed in programming languages pretty much since BASIC; for example, LISP couldn't survive without its lambda expressions, and both Python and Ruby use variants of def to obtain a functio
{{#tags}}- {{label}}
{{/tags}}