jastrachan | 23 Apr 17:58 2004
Picon

breaking out of a closure loop (was Re: Tip of the day: a groovy web server)

On 23 Apr 2004, at 16:25, Jamie McCrindle wrote:
> +1 for being able to break out of a closure (currently "return" acts 
> like a
> continue in a loop sense... hmm... so if continue was added, should 
> "return"
> then act like a return from the surrounding method / closure?).

I've added this issue to the discussions on the JSR wiki...

http://docs.codehaus.org/display/GroovyJSR/break+in+closure

if we did this, 'break' sounds a possible syntax. 'continue and return' 
would maybe have similar behaviour?

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

Gmane