We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 114b784 commit 9042960Copy full SHA for 9042960
src/streams/map.md
@@ -13,6 +13,16 @@ Stream<Integer> numberStream = numbers.stream()
13
.map(Integer::parseInt); // 1, 2, 3
14
```
15
16
+You can also call `.map` multiple times to apply multiple transformations.
17
+
18
+```java,no_run
19
+var numbers = List.of("1", "2", "3");
20
21
+Stream<Integer> numberStream = numbers.stream()
22
+ .map(Integer::parseInt) // 1, 2, 3
23
+ .map(x -> x * 2); // 2, 4, 6
24
+```
25
26
[^metaphor]: In the real life stream metaphor, this is akin to rocks getting polished
27
by sand as they flow.
28
0 commit comments