quicksort with Spec, tested