From: Mathieu Bouchard Date: 2000-12-04T01:20:52+09:00 Subject: [ruby-talk:6772] Re: Array Intersect (&) question > is natural intersection. Both make me suspect easy implementation. > Probably proper intersection is '(1 2) for this case. If we're implementing Sets using Arrays, yes. There is another formalism called MultiSet. I don't know how it works (in math textbooks), but intuitively I'd say: in A, e appears x times in B, e appears y times in A&B, e appears min(x,y) times in A|B, e appears max(x,y) times however I *don't* advocate changing the behaviour of Array. matju