Created
June 26, 2018 12:36
-
-
Save shelajev/017557c98bb10f1a3d9b7ec0c2f33608 to your computer and use it in GitHub Desktop.
Parallel-Streams.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return Arrays.stream(values).parallel() | |
| .map(x -> x + 1) | |
| .map(x -> x * 2) | |
| .map(x -> x + 5) | |
| .reduce(0, Double::sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment