code: function mergeSort(arr, sorter) {
          var temp = new Array(arr.length);
  
          function copyBack(start, end) {
              for (; start < end; start++) {
                  arr[start] = temp[start];
              }
          }
  
          function sort(start, end) {
              if ((end - start) < 2) {
                  return;
              }
              var middle = Math.floor((end + start) / 2);
              sort(start, middle);
              sort(middle, end);
              merge(start, middle, end);
              copyBack(start, end);
          }
  
          function merge(start, middle, end) {
              for (var left = start, right = middle, i = start; i < end; i++) {
                  if (left < middle && (right >= end || sorter(arr[left], arr[right]) <= 0)) {
                      temp[i] = arr[left];
                      left++;
                  } else {
                      temp[i] = arr[right];
                      right++;
                  }
              }
          }
  
          sort(0, arr.length);
  
          return arr;
      }
docs: We need a stable sort in order to implement SortedListProjection because we want to be able to perform insertions in a predictable location s.t. if we were to apply another sorted projection over the same list (now containing the inserted data) the resulting order would be the same.