We will keep it but under flatCollect:
and introduce collectAsSet: for the flatCollect: asSet semantics
Stef
On Jun 17, 2008, at 1:52 AM, Adrian Kuhn wrote:
As I designed it, collectUnion uses the semantics of
the receiver
for doing the union, ie the union of arrays can have duplicates.
Why? I feel this is more natural (and it performs better for
millions of objects, never forget, a set is always implemented as
dictionary or worse). This test asserts that no one changes
collectUnion to use set semantics for arrays.
But feel free to change this if you prefer set semantics.
AA
On 14 Jun 2008, at 15:55 , stéphane ducasse wrote:
I would like to fix
collectUnion:
and I would like to understand why
(#((1 2) (3 4) (5 3)) collectUnion: [ :each ]) equalsTo: #(1 2 3 3
4 5))
and not to #(1 2 3 4 5)
is it a bug in the test?
Stef