what is the source code of setof in prolog?
setof in prolog
2.9k Views Asked by sachin agarwalla At
2
There are 2 best solutions below
0

In case you are looking for the Sicstus built-in predicate implementation, it can be found here: http://www.sics.se/sicstus/docs/4.2.1/html/sicstus/mpg_002dref_002dsetof.html as:
setof(+Template, +Generator, -Set)
Unlike findall/3 and bagof/3, setof does not return duplicates and does give sorted order.
I.