# [JEP 485](https://openjdk.org/jeps/485) examples Source: https://openjdk.org/jeps/485 ```java List> windows = Stream.iterate(0, i -> i + 1) .gather(Gatherers.windowFixed(3)) .limit(2) .toList(); // [[0, 1, 2], [3, 4, 5]] ``` ```java List prefixSums = Stream.of(1, 2, 3, 4) .gather(Gatherers.scan(() -> 0, Integer::sum)) .toList(); ```