[m-rev.] predicate name needed

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Dec 22 18:26:29 AEDT 2014


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.

Zoltan.


More information about the reviews mailing list