add `compare` module with comparators

Take two. The heap code will follow later.
I thought you weren't including this stuff.