projog

3.7. compound(X) - checks that a term is a compound term.

compound(X) succeeds if X currently stands for a compound term.

Examples

?- compound(a(b,c)).

yes

?- compound(1+1).

yes

?- compound([a,b,c]).

yes

?- compound([]).

no

?- compound(abc).

no

?- compound(1).

no

?- compound(1.5).

no

?- compound(X).

no

?- compound(_).

no