This subroutine takes two overlapping ranges and returns a single range which contains the region of overlap.
Note that the function will not work UNLESS THE RANGES OVERLAP as tested by checkRangeOverlap() (see section 9.4.2).
function andRangePair(rangeA, rangeB) result(andedRanges) type(RangeT), intent(in) :: rangeA, rangeB type(RangeT) :: andedRanges end function andRangePair