| tests whether the argument is a compound term.
compound(+Term)
compound/1 succeeds if Term is a compound term otherwise it fails.
Arguments
Term term
Examples
| compound([l,i,s,t]). |
Succeeds.
| | compound(f(X,Y)). |
Succeeds. |
|
X=a*(b+c), compound(X).
| Succeeds with substitution X <- a*(b+c).
|
| compound([a,t,o,m]). |
Succeeds. |
| compound('this is an atom'). |
Fails. |
Standard
This predicate is part of the ISO-Prolog Standard.
See also
atom/1,
atomic/1,
float/1,
integer/1,
nonvar/1,
number/1,
var/1.
|