is a list or symbol.
is any backward chaining goal.
The backward chaining inference engine is started to look for all sets of bindings which satisfy
. Using those each of bindings,
is instantiated and returned as a list.
A list is returned containing zero or more occurrences of
, each instantiated with a different set of bindings which satisfies
(findall '(?x is in (1 2 3)) '(member ?x (1 2 3)))
((1 is in (1 2 3))
(2 is in (1 2 3))
(3 is in (1 2 3)))
(findall '(?truck is a truck) '(truck ?truck))
((#<TRUCK TRUCK1> IS A TRUCK)
(#<TRUCK TRUCK2> IS A TRUCK))
KnowledgeWorks and Prolog User Guide - 4 Apr 2005