nit: comparison functions by convention offer support for sorting. it might be better to name this something else, such as is_equal, with a boolean return value