var/1 meta-logical

Synopsis

var(+Term)

Term is currently uninstantiated (var is short for variable).

Arguments


Term term

Description

An uninstantiated variable is one that has not been bound to anything, except possibly another uninstantiated variable. Note that a compound term with some arguments that are uninstantiated is not itself considered to be uninstantiated.

Examples

     | ?- var(foo(X,Y)).
     
     no
     | ?- var([X,Y]).
     
     no
     | ?- var(X).
     
     X = _3437 ;
     
     no
     | ?- Term = foo(X,Y), var(Term).
     
     no
     

See Also

atom/1, atomic/1, number/1, compound/1, callable/1, nonvar/1, simple/1