Working through the Euler puzzles in groovy