^/2
+X ^
+*P
Equivalent to "there exists an X such that P is
true", thus X is normally an unbound variable. The use of the
explicit existential quantifier outside setof/3
and bagof/3
is superfluous.
Equivalent to simply calling P
As for call/1
:
type_error
context_error
instantiation_error
Using bagof/3
without and with the existential quantifier:
| ?- bagof(X, foo(X,Y), L). X = _3342, Y = 2, L = [1,1] ; X = _3342, Y = 3, L = [2] ; no | ?- bagof(X, Y^foo(X,Y), L). X = _3342, Y = _3361, L = [1,1,2] ; noref-all-cse-equ
setof/3
, bagof/3