Simplify variable assignments for _.reduce