ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

request for list comprehensions #353

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I, for one, would love to see list comprehensions in Groovy/Groovy++.

I'm talking about stuff like this (from Python):
  [ (x,y) for x in range(5) for y in range(3) if (y+x) % (x+2) == 0 ]

Looks like the talk for adding 
  * http://jira.codehaus.org/browse/GROOVY-4105
  * http://jira.codehaus.org/browse/GROOVY-54

I'm not sure what Groovy++'s perspective on syntactic sugar is, whether you 
guys would be interested in this at all.

Original issue reported on code.google.com by kap4...@gmail.com on 18 Mar 2011 at 3:20