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