applyFnToRanges function

apply a function to all the genotypes for markers found in several specified ranges