jastrachan | 1 Feb 10:26 2005
Picon

Re: [groovy-dev] Diff of Java and Groovy grammars


On 27 Jan 2005, at 20:07, Rapheal Kaplan wrote:
>  Curious.  Is it actually useful to just have a code block that 
> returns a value?

Absolutely! The whole of GPath is built on this very feature.

value = [1, 2, 3].collect { it * 2 }
assert value == [2, 4, 6]

James
-------
http://radio.weblogs.com/0112098/


Gmane