Type testing
This section provides predicates for type testing.
Check if atom.
atom( @term )
atom(X) is true if and only if X is an atom.
Check if compound.
compound( @term )
compound(X) is true if and only if X is a compound term (neither atomic nor
a variable).
Check if variable.
var( @term )
var(X) is true if and only if X is a variable.
Check if not variable.
nonvar( @term )
nonvar(X) is true if and only if X is not a variable.
Check if integer or float.
number( @term )
number(X) is true if and only if X is either an integer or a float.
Check if float.
float( @term )
float(X) is true if and only if X is a float.
Check if integer.
integer( @term )
integer(X) is true if and only if X is an integer.
Check if ground term.
ground( @term )
ground(X) is true if and only if X is a ground term.