MergeSort, CountInversions and ClosestPoints in racket