11.3.31 call_residue_vars/2

call_residue_vars(+Goal, -Vars)

Synopsis

Executes the procedure call Goal, unifying Vars with the list of residual variables that have blocked goals or attributes attached to them.

Arguments

:Goal
callable, must be nonvar
Vars
list of var

Description

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)) ?

Backtracking

Depends on Goal.

Exceptions

Call errors (see ref-sem-exc).

See Also

ref-sem-sec.


Send feedback on this subject.