add `compare` module with comparators

Take two. The heap code will follow later.
convention, for better or worse, is to use `and` in the name.