private T walkOverPairs(ReadPairWalker<M,T> walker, Shard shard, List<SAMRecord> reads, T sum) {
// update the number of reads we've seen
shard.getReadMetrics().incrementNumIterations();
// Sort the reads present in coordinate order.
Collections.sort(reads,new SAMRecordCoordinateComparator());
final boolean keepMeP = walker.filter(reads);
if (keepMeP) {
M x = walker.map(reads);
sum = walker.reduce(x, sum);