Skip to content

Instantly share code, notes, and snippets.

@zeakd
Created October 22, 2018 17:23
Show Gist options
  • Save zeakd/e408463fac293305fa5d2a397f1865b0 to your computer and use it in GitHub Desktop.
Save zeakd/e408463fac293305fa5d2a397f1865b0 to your computer and use it in GitHub Desktop.
Examples for explaining arrow funciton
...
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