quicksort in Haskell and Python