findall3+Var, +Goal, -Bag
Creates a list of the instantiations Var gets successively on
backtracking over Goal and unifies the result with Bag.
Succeeds with an empty list if Goal has no solutions. findall3 is
equivalent to bagof3 with all free variables bound with the existence
operator (), except that bagof3 fails when goal has no
solutions.
bagof3+Var, +Goal, -Bag
Unify Bag with the alternatives of Var, if Goal has
free variables besides the one sharing with Var bagof will
backtrack over the alternatives of these free variables, unifying Bag with the corresponding alternatives of Var. The construct
+VarGoal tells bagof not to bind Var in
Goal. bagof3 fails if Goal has no solutions.
The example below illustrates bagof3 and the operator. The
variable bindings are printed together on one line to save paper.
setof3+Var, +Goal, -Set
Equivalent to bagof3, but sorts the result using sort2 to get a sorted
list of alternatives without duplicates.