Extract a new Array#middle method from the functionality of Array#median