int total = iterate(0, n -> n + 1).map(x -> x*x).limit(10).sum();
int total = IntStream.rangeClosed(1, 10).map(x -> x*x).sum();
int total = iterate(0, n -> n + 1).map(x -> x*x).limit(10).sum();