findall/4¶
findall( T,+ G,- L)* is iso
findall//33 is a simplified version of bagof which has an implicit existential quantifier on every variable.
Unifies L with a list that contains all the instantiations of the term T satisfying the goal G.
With the following program:
a(2,1).
a(1,1).
a(2,2).
the answer to the query
findall(X,a(X,Y),L).
would be:
X = _32
Y = _33
L = [2,1,2];
no