Created
October 22, 2018 17:23
-
-
Save zeakd/e408463fac293305fa5d2a397f1865b0 to your computer and use it in GitHub Desktop.
Examples for explaining arrow funciton
This file contains 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
... | |
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); | |
List<Integer> squares = numbers.stream() | |
.map(n -> n * n) | |
.collect(Collectors.toList()); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment