As you know setof/3 can order a list with duplicate removal. Is there a way to use setof/3 keeping duplicates? Basically is there a built-in sorting function setof-like? (meaning if I have [a,3,2,c,b] then I’ll get [2,3,a,b,c].
PS: don’t suggest “Implement a merge sort/insertion sort/whatever“. I’m looking for a built-in way.
See here, note the Distinguish argument.