Now with style. Addressing most of Reynolds comments.
Switching mapReduceTriplets mapFunction to return iterator instead of array to allow optimizations of the returned object.