11.3.4 acyclic_term/1   ISO

Synopsis

acyclic_term(+Term)   since release 4.3

Term is currently instantiated to a finite (acyclic) term.

Arguments

Term

term

Description

True if X is finite (acyclic). Runs in linear time.

Examples

| ?- X = g(Y), acyclic_term(f(X,X)).
X = g(Y) ? 
yes
| ?- X = g(X), acyclic_term(X).

no
| ?- X = g(X), acyclic_term(f(X)).

no

Exceptions

None.

See Also

ref-lte-act.


Send feedback on this subject.