[m-rev.] predicate name needed

Ian MacLarty imaclarty at opturion.com
Tue Dec 23 10:24:02 AEDT 2014


On Mon, Dec 22, 2014 at 6:26 PM, Zoltan Somogyi <zoltan.somogyi at runbox.com>
wrote:

> I would like to add a predicate to all the modules in the library
> that implement sets, but I cannot think of a good name for it.
> Here is the description of what I intend it to do:
>
> +    % compare_sets(SetA, SetB, OnlyInA, InAandB, OnlyInB):
> +    % Given SetA and SetB, return the elements that occur only in one set,
> +    % and the elements that occur in both.
> +    %
> +    % XXX better name? symmetric_difference would work for OnlyInX, but
> +    % not for InAandB.
> +    %
> +:- pred compare_sets(set(T)::in, set(T)::in,
> +    set(T)::out, set(T)::out, set(T)::out) is det.
>
> Any ideas for a good name? set_intersection_and_differences
> would self-explanatory enough, but it is long. sets_venn_diagram
> would imply the presence of graphics for some people.
>
>
Some ideas: "coverage", "regions", "interference".

Ian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141223/2f736fb2/attachment.html>


More information about the reviews mailing list