Scala Implementation of QuickSort