mw-equiv provides one of many possible equivalence relations between Common Lisp objects, similar to the standard EQUAL function family, but extensible.

Unlike the standard equalities, MW-EQUIV can be extended for new objects through a simple CLOS protocol. The rules when two objects are considered equivalent distinguish between mutating and frozen objects. A frozen object is promised not to be mutated in the future in a way that operations on it can notice the difference.

Documentation can be found on the MW-EQUIV home page. An article on MW-EQUIV provides some background and additional examples.

Topics: language extension