For multisets, I'd say that the current behaviour is correct,
(<1,1,2>) ^ (<1>);
(2) Result: (< /* 2 elements */ 1, 2 >)
Let #X denote the number of occurances of a given element in X, then it makes sense to have
#(A ^ B) == #A + #B (mod 2)
just like above. But I don't know whether or not it's desirable to have arrays behave as multisets for this operation.
/ Niels Möller ()
Previous text:
2003-02-05 15:15: Subject: Xor
Will anything break if the behaviour changed now? Or is the behaviour wanted in some way? Or is it hard to implement? Else, I'll add that to the testsuite for mappings, arrays and multisets, and check around what can be done about it.
/ Mirar