Functional implementation of collecting objects into groups
Well you can avoid a few variable assignments by returning immediately,
also by using some details of the Underscore.js API, that is by
specifying the used indexes for groupBy/map directly.

_.chain(a)
 .groupBy(0)
 .mapObject(function (val, key) {
    return _.chain(val).map(1).uniq().value();
 })
 .value();


I doubt there's a good way to avoid mapObject, after all, that's what
it's for.

With 1.7 you could also write that even less verbose:

_.chain(a)
 .groupBy(0)
 .mapObject((val, key) =&gt; _.chain(val).map(1).uniq().value())
 .value();


Looks pretty functional to me.