Lambda expressions and Stream API with Groovy or JAVA8
Lambda expressions and Stream API with Groovy and JAVA 8 Iteration groovy def numbers = [1, 2, 3, 4, 5, 6] numbers.each { e -> println e } numbers.each { println it } java List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6); numbers.forEach(e -> System.out.println(e)); numbers.forEach(System.out::println); collect groovy def numbers = [1, 2, 3, 4, 5, 6] numbers.collect { it * 2 }.each { e -> println e } println numbers.