add `compare` module with comparators

Take two. The heap code will follow later.
Can't you just compare the vecs? Why deref into slices?