Kotlin Different Kinds of Streams #6 - lazily iterate a stream of Ints, map the values, print results


Example

// Java:
IntStream.range(1, 4)
    .mapToObj(i -> "a" + i)
    .forEach(System.out::println);

// a1
// a2
// a3    
// Kotlin:  (inclusive range)
(1..3).map { "a$it" }.forEach(::println)