reduce a set of values to a single value