(String[] args)
| 5 | |
| 6 | class Peeking { |
| 7 | public static void |
| 8 | main(String[] args) throws Exception { |
| 9 | FileToWords.stream("Cheese.dat") |
| 10 | .skip(21) |
| 11 | .limit(4) |
| 12 | .map(w -> w + " ") |
| 13 | .peek(System.out::print) |
| 14 | .map(String::toUpperCase) |
| 15 | .peek(System.out::print) |
| 16 | .map(String::toLowerCase) |
| 17 | .forEach(System.out::print); |
| 18 | } |
| 19 | } |
| 20 | /* Output: |
| 21 | Well WELL well it IT it s S s so SO so |