Documentation Prolog Predicate Reference builtin setof/3

setof/3

Find all the values that would make a goal succeed and organize and order them.

Description

setof( ?term, +callable_term, ?list )

setof(Template, Goal, Instances) is equivalent to bagof/3, but it also applies sort/2 to the result.

Implementation