setof/4¶
setof( X,+ P,- B)* is iso
Similar to bagof( _T_, _G_, _L_)
but sorts list L and keeping only one copy of each element. Again, assuming the same clauses as in the examples above, the reply to the query
setof(X,a(X,Y),L).
would be:
X = _32
Y = 1
L = [1,2];
X = _32
Y = 2
L = [2];
no