Logtalk reference manual
Built-in method: bagof/3

bagof/3

Description

bagof(Term, Goal, List)

(see the Prolog ISO standard definition)

Template and modes

bagof(@term, +callable, -list)

Errors

(see the Prolog ISO standard)

Examples

To find all solutions in this:
bagof(Term, Goal, List)
To find all solutions in self:
bagof(Term, ::Goal, List)
To find all solutions in an object:
bagof(Term, Object::Goal, List)