Skip to content
Test implementation of lazy heap sort in Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Heap sort

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 sort if 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 inputs.


Copyright (C) 2011 Chris Gray.

Distributed under the same license as Clojure.

You can’t perform that action at this time.