instantiation_error() if Term is unbound 
and Name/Arity is insufficiently instantiated.
SWI-Prolog also supports terms with arity 0, as in a() 
(see
section 5). Such terms 
must be processed using
functor/4 
or compound_name_arity/3. 
The predicate functor/3 
and
=../2 raise a domain_error 
when faced with these terms. Without this precaution a round trip 
of a term with arity 0 over functor/3 
would create an atom.