added quick sort scala in functional style