def list = [0, 1] while(list[-1] <= 4000000) { list << list[-2] + list[-1] } println "list.sum() = ${list.findAll{it % 2 == 0}.sum()}"