Modules - findall
bagof/3, findall/3, setof/3
bagof/3 - finds all solutions to a goal and collects them up into a list.
- Usage
- :- import(
findall
).
- bagof(Template, Goal, List)
- Description
- Form a Subgoal from Goal as follows:
- If Goal does not have the form (A ^ B), then Subgoal is Goal.
- Otherwise, the Subgoal of Goal is the subgoal of B.
- TBD
- Errors
instantiation_error
- Subgoal is a variable.
type_error(callable, Goal)
- Subgoal or some part of Subgoal is not callable.
type_error(list, List)
- List is not a variable, list, or partial list.
- Examples
- Compatibility
- Standard Prolog, with the added requirement to import the
findall
module to get the definition of bagof/3.
- See Also
- findall/3, setof/3
findall/3 - finds all solutions to a goal and collects them up into a list.
- Usage
- :- import(
findall
).
- findall(Term, Goal, List)
- Description
- TBD
- Errors
instantiation_error
- Goal is a variable.
type_error(callable, Goal)
- Goal or some part of Goal is not callable.
type_error(list, List)
- List is not a variable, list, or partial list.
- Examples
- Compatibility
- Standard Prolog, with the added requirement to import the
findall
module to get the definition of findall/3.
- See Also
- bagof/3, fuzzy_findall/3, setof/3
setof/3 - finds all solutions to a goal and collects them up into a list.
- Usage
- :- import(
findall
).
- setof(Term, Goal, List)
- Description
- TBD
- Errors
instantiation_error
- Goal is a variable.
type_error(callable, Goal)
- Goal or some part of Goal is not callable.
type_error(list, List)
- List is not a variable, list, or partial list.
- Examples
- Compatibility
- Standard Prolog, with the added requirement to import the
findall
module to get the definition of setof/3.
- See Also
- bagof/3, findall/3