call_residue_vars/2
call_residue_vars(
+Goal,
-Vars)
Executes the procedure call Goal, unifying Vars with the list of residual variables that have blocked goals or attributes attached to them.
Goal is executed as if by call/1
. Vars is unified
with the list of new variables created during the call that remain
unbound and have blocked goals or attributes attached to them.
For example:
| ?- call_residue_vars((dif(X,f(Y)), X=f(Z)), Vars). X = f(Z), Vars = [Z,Y], prolog:dif(f(Z),f(Y)) ?
Depends on Goal.
Call errors (see ref-sem-exc).