I've got a list of Person objects like this:
list.add(new Person("John", 20)); //person is just name and age
list.add(new Person("Maria", 21));
list.add(new Person("John", 40));
list.add(new Person("Carl", 10));
The resulting list must have no persons with the same name, regardless of age, so only 3 elements would survive. How can this be accomplished using Java 8 lambda expressions?