public override bool Unify(AbstractTerm term)
{
if (term.IsReference)
{
term.Assign(this);
return true;
}
if (term.IsStructure)
{
if (term.Name != _name || term.Arity != _arity)
{
return false;
}
for (int i = 0; i < _arity; i++)
{
if (!this[i].Unify(term[i]))
{
return false;
}
}
return true;
}
return false;
}