<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 22, 2014 at 6:26 PM, Zoltan Somogyi <span dir="ltr"><<a href="mailto:zoltan.somogyi@runbox.com" target="_blank">zoltan.somogyi@runbox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would like to add a predicate to all the modules in the library<br>
that implement sets, but I cannot think of a good name for it.<br>
Here is the description of what I intend it to do:<br>
<br>
+    % compare_sets(SetA, SetB, OnlyInA, InAandB, OnlyInB):<br>
+    % Given SetA and SetB, return the elements that occur only in one set,<br>
+    % and the elements that occur in both.<br>
+    %<br>
+    % XXX better name? symmetric_difference would work for OnlyInX, but<br>
+    % not for InAandB.<br>
+    %<br>
+:- pred compare_sets(set(T)::in, set(T)::in,<br>
+    set(T)::out, set(T)::out, set(T)::out) is det.<br>
<br>
Any ideas for a good name? set_intersection_and_differences<br>
would self-explanatory enough, but it is long. sets_venn_diagram<br>
would imply the presence of graphics for some people.<br>
<br></blockquote><div><br></div><div>Some ideas: "coverage", "regions", "interference".</div><div><br></div><div>Ian.</div></div></div></div>