Groovy web console

subscribe to the feed Subscribe
to this
site

Untitled

Published 5 months ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def digits = ['a','b','c','d','e','f']
def evens = [], odds = [] 
digits.eachWithIndex{ v, ix -> ( ix & 1 ? odds : evens ) << v }
println evens
println odds