Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. -- QuickSort in Ascending order.
  2. qsort :: Ord a => [a] -> [a]
  3. qsort [] = []
  4. qsort (x : xs) = qsort small_list ++ [x] ++ qsort large_list
  5.                  where
  6.                     small_list = [a | a <- xs, a <= x]
  7.                     large_list = [b | b <- xs, b > x]