Collecting Solutions to a Goal

When there are several solutions to a goal, if the user wants to collect all the solutions he may be led to use the data base, because backtracking will forget previous solutions.

YAP allows the programmer to choose from several system predicates instead of writing his own routines. findall//33 gives you the fastest, but crudest solution. The other built-in predicates post-process the result of the query in several different ways:

Var:

1. *** prolog::Var**:

1. Goal *The existential quantifier symbol is only significant in prolog::bagof:

1. Goal *The existential quantifier symbol is only significant in setof and prolog::similar:

1. Goal *The existential quantifier symbol is only significant in setof and where it stops choosing on the quantified variable Var If run on its prolog::oWnl: