domain_error(not_less_then_zero, Arg)
if Arg
< 0.
This predicate may be used for destructive assignment to terms, using them as and extra-logical storage bin.
?- foo(hello, X) =.. List. List = [foo, hello, X] ?- Term =.. [baz, foo(1)] Term = baz(foo(1)) |
?- numbervars(foo(A, B, A), this_is_a_variable, 0, End). A = this_is_a_variable(0) B = this_is_a_variable(1) End = 2 |
In Edinburgh Prolog the second argument is missing. It is fixed to be
$VAR
.
?- free_variables(a(X, b(Y, X), Z), L). L = [G367, G366, G371] X = G367 Y = G366 Z = G371 |
copy_term(In, Out) :- recorda(copy_key, In, Ref), recorded(copy_key, Out, Ref), erase(Ref). |