I would like to return from a closure, like one would if using a break statement in a loop.
For example:
largeListOfElements.each{ element->
Today I faced a similar problem while working with each closure. I wanted to break the flow of execution based on my condition but couldn't do it.
The easiest way to do in groovy is to use any() on a list instead of each if you wish to return a boolean based on some condition.