Skip to content

part2 was done#168

Open
andr2ei wants to merge 2 commits intojava8-course:masterfrom
andr2ei:part2
Open

part2 was done#168
andr2ei wants to merge 2 commits intojava8-course:masterfrom
andr2ei:part2

Conversation

@andr2ei
Copy link

@andr2ei andr2ei commented Jul 4, 2017

Andrei Andronov

//
// (Person -> String) -> (Person, Person) -> int
private BiFunction<Person, Person, Integer> ageOfPersonWithTheLongestFullName(Function<Person, String> getFullName) {
return (p1, p2) -> getFullName(p1).length() > getFullName(p2).length() ? p1.getAge() : p2.getAge();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use function getFullName, not method getFullName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants