MergeSort:= function(A, p, r)
local q, A
if p<r then;
q:= (p+r)/2;
mergeSort(A, p, q);
mergeSort(A, q+1, r);
merge(A, p , q, r);
fi;
end;