findall/3
findall/3
return unsorted list of terms in solutions of a given goal
findall( Term, Goal, List )
?Term <term>
+Goal <goal>
?List <variable> or <list>
This predicate returns an unsorted list of solutions that would normally be obtainable only by failing and backtracking through a query. It succeeds if List can be unified to a list of all instances of Term such that Goal is true. The Term may be any Prolog term, and Goal may be any Prolog goal.
See Also
findall/3 is nowadays a standard Prolog predicate. The implementation of findall/3in G.I.S. Prolog is efficient and robust; any expression may be used as the second argument, including expressions that contain disjunctions.
findall(Variable,Expression_containing_the_variable,VarValueList)
-(i,i,o)