sum() is a method on Collection after it's been enhanced by the GDK. It was there in 1.0 but new over-ridden versions were included in 1.5 and above. You can read more about it and find many other hiddend Groovy nuggets in the GDK docs: http://groovy.codehaus.org/groovy-jdk. This doc will show you all the nifty features added to JDK classes / interfaces.
Author of Grails: A Quick-Start Guide
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop