Lazy quicksort snippet by @anj1