The type checking predicates

integer/1, var/1, nonvar/1

integer(Term)
var
(Term)
nonvar(Term)

Check the type of a Term

Remarks

integer(Term) succeeds if the Term can be unified with integer value.

var(Term) succeeds if the Term is free variable.

nonvar(Term) succeeds if the Term is bound.

Example

A is 3
var(A)
No
nonvar(A)
Yes
integer(A)
Yes