Initial merge_range() function.