[m-rev.] for review: list__sort_and_remove_equivs/3

Mark Brown dougl at cs.mu.OZ.AU
Fri Sep 6 01:05:22 AEST 2002


On 05-Sep-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> The same issue arises with list__merge_and_remove_dups,
> so you might want to define list__merge_and_remove_equivs too.
> 
> On 05-Sep-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> > Index: library/list.m
> > +	% list__sort_and_remove_equivs(Compare, Unsorted, Sorted) is true iff
> > +	% Sorted is a list containing the same elements as Unsorted, but with
> > +	% any equivalent elements removed, where Sorted is a sorted list with
> > +	% respect to the ordering defined by the predicate term Compare.  Note
> > +	% that elements are considered to be equivalent if the result of
> > +	% comparison using Compare is '='.
> > +:- pred list__sort_and_remove_equivs(pred(X, X, comparison_result), list(X),
> > +	list(X)).
> > +:- mode list__sort_and_remove_equivs(pred(in, in, out) is det, in, out) is det.
> 
> The documentation here is not very precise/clear.

I agree.  Unfortunately, I was merely mimicking the documentation for
list__sort_and_remove_dups which has the same problem.  Likewise with
the code.  I'll fix both the old and the new stuff.

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list