bagof(Term, Goal, List)
(see the Prolog ISO standard definition)
bagof(@term, +callable, -list)
(see the Prolog ISO standard)
bagof(Term, ::Goal, List)
bagof(Term, Object::Goal, List)