Add documentation for equals function.