void doSomething(String x){ println(x) } def items = ["aa", "bb", "cc"]; items.each { doSomething(it) } "Done."