Talk:Haskell a la carte
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Quicksort
I insist that
sort :: Ord a => [a] -> [a]
sort [] = []
sort (x:xs) = sort (filter (<x) xs) ++ [x] ++ sort (filter (>=x) xs))
is a quicksort implementation. It's not in-place, but it has the same spirit and recursion pattern. -- apfeλmus 08:26, 12 June 2008 (UTC)