FASILL documentation Predicate Reference type testing

Type testing

This section provides predicates for type testing.

atom/1

Check if atom.

atom( @term )

atom(X) is true if and only if X is an atom.

compound/1

Check if compound.

compound( @term )

compound(X) is true if and only if X is a compound term (neither atomic nor a variable).

var/1

Check if variable.

var( @term )

var(X) is true if and only if X is a variable.

nonvar/1

Check if not variable.

nonvar( @term )

nonvar(X) is true if and only if X is not a variable.

number/1

Check if integer or float.

number( @term )

number(X) is true if and only if X is either an integer or a float.

float/1

Check if float.

float( @term )

float(X) is true if and only if X is a float.

integer/1

Check if integer.

integer( @term )

integer(X) is true if and only if X is an integer.

ground/1

Check if ground term.

ground( @term )

ground(X) is true if and only if X is a ground term.