mappedTo -> join? (original) (raw)

Michael Nascimento misterm at gmail.com
Tue Jan 8 10:21:54 PST 2013


Do these Reducers include the opposite, i.e., a Map<T, Person>? This is a most common business operations in the code I've been trying to migrate to lambda use.

Regards, Michael

On Tue, Jan 8, 2013 at 4:11 PM, Remi Forax <forax at univ-mlv.fr> wrote:

On 01/08/2013 06:12 PM, Brian Goetz wrote:

One of the reducers we've got takes a Stream and a function T->U and creates a Map<T,U>. Currently we call this "mappedTo". Should this be called "join" instead? Or mapJoin? Map<Person, Integer> map = people.reduce(mappedTo(Person::getAge))); vs Map<Person, Integer> map = people.reduce(join(Person::getAge))); Map<Person, Integer> map = people.reduce(mapJoin(Person::getAge))); or just toMap, Map<Person, Integer> map = people.reduce(Reducer.toMap(Person::getAge))); Rémi



More information about the lambda-libs-spec-observers mailing list