sort package:heaps

O(n log n). Perform a heap sort
O(n). Returns the elements in the heap in some arbitrary, very likely unsorted, order.
>>> toUnsortedList (fromList [3,1,2])
[1,3,2]
fromList . toUnsortedListid