is there a way to 'break' out of a groovy closure.
maybe something like this:
[1, 2, 3].each { println(it) if (it == 2) break }
I often forget that Groovy implements an "any" method.
[1, 2, 3].any { println it return (it == 2) }?
2.1m questions
2.1m answers
60 comments
57.0k users