That's what I thought too, but I don't know if we have that, since there currently is no way to look up the "value".
Only when looping over multisets you can see that they are a multiset,
| > v=(<1,1,1,2,2,3>); | > foreach (v;int i;) werror("%d\n",i); | 1 | 1 | 1 | 2 | 2 | 3
as far as I can see. Using the index operator, it's not very multi.
And +, -, |, & and ^ doesn't all give that logical results:
(<1,1,1,2,2,3>)+(<1,3>) gives (<1,1,1,1,2,2,3,3>), (<1,1,1,2,2,3>)-(<1,3>) gives (<2,2>), (<1,1,1,2,2,3>)|(<1,3>) gives (<1,1,1,2,2,3>), (<1,1,1,2,2,3>)&(<1,3>) gives (<1,3>), (<1,1,1,2,2,3>)^(<1,3>) gives (<1,1,2,2>)
/ Mirar
Previous text:
2003-02-06 11:00: Subject: Xor
Personally, I don't quite understood why we have multisets at all. In principle, a multiset is the same thing as a mixed:int(0,...) mapping.
/ Niels Möller ()