swipl-devel
swipl-devel copied to clipboard
ADDED: ord_difference/4, ord_partition/5
These operations (split diff, diff+intersection) felt like they were missing in the ordsets library. ord_partition/5, in particular, is a generalization of a number of different ordsets predicates; if it were not for the fact that it potentially uses more memory than simpler predicates like ord_intersection/3, I'd suggest that the others get rewritten to use ord_partition/5 as a foundation.
It also brings a potential VM optimization to light: being able to
propagate the "don't-care"-ness of a _
argument into the called
predicate could allow a complex, multi-modal predicate like this
to be used without penalty.