This is an implementation of the
heap-sort algorithm in pure
Clojure. As opposed to the standard
sort algorithm in Clojure
(which is inherited from Java), it returns a lazy sequence of sorted
elements. Thus, it should be theoretically faster than
only a small number of elements from the start of the sorted
sequence are used.
Tests are given showing that this is the case for large inputs.
They also show that it is not much slower than
sort for large
Copyright (C) 2011 Chris Gray.
Distributed under the same license as Clojure.