Grooving Project Euler # 8
Your code is too imperative while groovy favours Functional Programming:

def largest_product = 
  (0 .. number.size() - digits)
    .map {number[i..&lt;(i + digits)].inject(1) {acc, it -&gt; acc * (it as long)}}
    .max

println largest_product


As you can see, the code is now without all those confusing variables, and the algorithm is more clearly expressed.