Forked from hasalex/gist:1b4e94a47f1dce6ae1b7c97bda34b824
Last active
September 25, 2017 14:18
-
-
Save farnulfo/60698194b16949f56f7811741cff9856 to your computer and use it in GitHub Desktop.
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
LocalDate now = LocalDate.now(); | |
persons.stream() | |
.filter(Person::isMale) | |
.filter(p -> p.isAdult(now) | |
.map(p -> p.getFirstName() + " " + p.getLastName()) | |
.collect(Collectors.toList()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment