pqueue-1.4.3.0 / benchmarks / HeapSort.hs
module HeapSort whereimport Data.PQueue.Min (MinQueue)import qualified Data.PQueue.Min as Pimport System.RandomheapSortRandoms :: Int -> StdGen -> [Int]heapSortRandoms n gen = heapSort $ take n (randoms gen)heapSort :: Ord a => [a] -> [a]heapSort = P.toAscList . P.fromList