Groovy web console

subscribe to the feed Subscribe
to this
site
sum attr list (via #groovywebconsole)
tweet this snippet Tweet
this
script

sum attr list

Published 4 months ago by Gabriel Bianchi with tags sum list
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
Collection a = [[x:1],[x:2],[x:3]]

println a.sum { it.x }