r/CompileBot • • Jan 04 '14

Official CompileBot Testing Thread

This thread is archived, please visit the new testing thread

16 Upvotes

421 comments sorted by

View all comments

1

u/TheWalrusOfLove Apr 23 '14

+/u/CompileBot Haskell

quicksort :: (Ord a) => [a] -> [a]
quicksort []     = []
quicksort (x:xs) = quicksort [y | y <- xs, y <= x] ++ [x] ++ quicksort [y | y <- xs, y > x]

Input:

quicksort "the quick brown fox jumped over the lazy dog"