:: Ord a => [a] -> [a] -package:hledger-lib package:heaps is:exact

O(n log n). Perform a heap sort