Collectors.reducing to List
You can use Collectors.toMap()
:
List<User> l = new ArrayList<> (list.stream()
.collect(Collectors.toMap(u -> u.name,
u -> new User (u.name,u.languages),
(u1, u2) -> new User(u1.name, u1.languages + ", " + u2.languages)))
.values());