in place of - is more than enough to get the desired data. Use of - often forgotten(not known) initially but very performance-wise approach. Code seems not to have problems at start or end of sequence (forgetting to return some ranges for items at the beginning or the end in some edge cases) is an instance method, but doesn't use any instance data. It, perhaps, was your design decision to avoid static helpers, or if it wasn't, then you may want to consider refactoring it into some helper method.