True when Term1 and Term2 are terms that have the
same functor (Name/Arity). The arguments must be
sufficiently instantiated, which means either Term1 or Term2
must be bound or both Name and Arity must be
bound.
If Arity is 0, Term1 and Term2 are
unified with Name for compatibility.