Groovy web console

subscribe to the feed Subscribe
to this
site

Crappy Groovy Capturing

Published 3 weeks ago by Me
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def closures = []
for (index in [1,2,3,4,5,6,7,8,9,10]) {
    closures.add({println index})
}

for (closure in closures) {
    closure()
}