Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3 acc f (a, b) x = if f x then (x:a, b)
- 4 else (a, x:b)
- 5
- 6 splitWith f = foldl (acc f) ([], [])
- 7
- 8 quickSort [] = []
- 9 quickSort (x:xs) = quickSort left ++ [x] ++ quickSort right
- 10 where (left, right) = splitWith (<=x) xs
- 11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement