fork download
  1. import java.util.stream.*;
  2.  
  3. class Ideone {
  4. public static void main (String[] args) throws java.lang.Exception {
  5. Stream.iterate(0, n -> n + 3)
  6. .map(x -> x * 2)
  7. .limit(10)
  8. .forEach(System.out::println);
  9. }
  10. }
Success #stdin #stdout 0.22s 320640KB
stdin
Standard input is empty
stdout
0
6
12
18
24
30
36
42
48
54