Sept. 8, 2011
10:49 a.m.
How should we handle the mathematical operations union / intersection / difference on different Collections? Right now the implementations are not completely consistent over the different types of collections: (#(1 1 2 2 3) union: #(2 2 3 4 4)) = #(1 2 3 4) asSet (#(1 1 2 2 3) difference: #(2 2 3 4 4)) = #(1 1) (#(1 1 2 2 3) intersection: #(2 2 3 4 4)) = #(2 2 3) I think it would make more sense to deal with this in the mathematical sense and remove duplicates and try to keep the type of the receiver: (#(1 1 2 2 3) union: #(2 2 3 4 4)) = #(1 2 3 4) (#(1 1 2 2 3) difference: #(2 2 3 4 4)) = #(1) (#(1 1 2 2 3) intersection: #(2 2 3 4 4)) = #(2 3) cami