add `compare` module with comparators

Take two. The heap code will follow later.
If Reverse has a default type of Natural, you could just write Reverse here, right? Any feelings on that?