

How expensive is this test? What algorithm is used?
(I'm trying to implement it on the "Prolog surface" and it's relatively complex)
Examples:
?- acyclic_term([1,2,3]). true. ?- acyclic_term([1,2,3|X]). true. ?- acyclic_term([1,2,3|foo]). true. ?- X=[1,2,3|X],acyclic_term(X). false.