tests whether the argument is a compound term.
compound/1 succeeds if Term is a compound term otherwise it fails.
Term term
| 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. |
This predicate is part of the ISO-Prolog Standard.