Allow more ways of creating objects using literals
Introduce new datatypes together with their operators and expressions.
Closure simple abbreviated syntax of closures: after a method call, put code in braces with parameters delimited from the closure body by an arrow.
log = '' (1..10).each{ log += it } assert log == '12345678910' log = '' (1..10).each{ counter -> log += counter } assert log == '12345678910' A second way of declaring a closure is to directly assign it to a variable: