AttVars is a list of all attributed variables in Term
and its attributes. That is, term_attvars/2
works recursively through attributes. This predicate is cycle-safe. The
goal
term_attvars(Term,[]) in an efficient test that Term
has
no attributes; scanning the term is aborted after the first
attributed variable is found.