hi,
according to http://topdefinitions.com/multisets-and-their-operations/ the difference between multisets is defined as: The difference of two multisets A and B, is a multiset such that the multiplicity of an element is equal to the multiplicity of an element in A minus multiplicity of an element in B, if the difference is +ve, and it is equal to 0 if the difference is 0 and –ve. It is denoted by A-B.
e.g. A={l,l,m,m,m,n,n} B={l,m,m,n,n,n}
A-B={l,m}
however in pike:
multiset A =(< "l","l","m","m","m","n","n">); multiset B =(< "l","m","m","n","n","n">); A-B;
Result: (< >)
greetings, martin.
That definition has some merit, but I'm not too keen on investigating each and every multiset subtraction if it breaks because of such a change. It's afterall not entirely rare to subtract with a simple multiset to remove the listed elements from the first one.
pike-devel@lists.lysator.liu.se