Project Euler question #1 solved in Groovy

By Steve Claridge on 2014-03-15.

Learning a new language? What better way to get started than to work through the Project Euler questions.

Here's my solution to question #1 in Groovy:

def t = 0
(1..999).each {
  if ( [it % 3,it % 5].contains(0) )
    t += it
}
println t