Given two lists of variables, what is the most compact and canonical way in ISO Prolog to determine the union of both? That is, we want a definition for the (meta-logical) predicates
varset_union(VarSet1, VarSet2, Union)
and for a list of lists
varset_union(VarSets, Union)
where Union
is a list of unique variables of the given VarSet
s.
Here is an overview of the built-ins in ISO/IEC 13211-1:1995 including Cor.2:2012.