Documentation setof/3
Related predicates
available from version beta

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