--Copyright The Numerical Algorithms Group Limited 1994.
)cl all
macro I == Integer
macro symdif == symmetricDifference
s:Multiset I
t:Multiset I
t1:Multiset I
s := multiset [1,2,3,4,5,4,3,2,3,4,5,6,7,4,10]
t := multiset [2,2,2,9]

union(s,t)
union(s,s)
intersect(s,t)
difference(s,t)
symdif(s,t)
symdif(s,s)

t1 := multiset [2,2]
[part?(t1,t), part?(t1,s), not part?(t,t1), not part?(s,t1)]
t1 := multiset [2,2,2]
[part?(t1,t), part?(t1,s), not part?(t,t1), not part?(s,t1)]
