Looks good to me.
Doru
On Jun 18, 2008, at 9:25 PM, stephane ducasse wrote:
Hi all
do we agree that the following is the semantics of flatCollect:
testCollectUnion
self assert: ((#((1 2) (3 4) (5 3)) collectUnion: [ :each ])
equalsTo: #(1 2 3 3 4 5)).
self assert: ((#((1 2) (2 3) (1 3 4)) collectUnion: [:each])
equalsTo: #(1 1 2 2 3 3 4)).
self assert: ((#() asCollection collectUnion: [:each]) equalsTo: #()
asCollection) true.
self assert: ((#() asCollection collectUnion: [:each]) equalsTo: #()
asSet).
self assert: ((#((1 2) (1 2) (1 3 4)) asSet collectUnion: [:each])
equalsTo: #(1 1 2 3 4) asSet).
self assert: ((#() asSet collectUnion: [:each]) equalsTo: #() asSet).
we happen the results of the collect. Like a mapcan in LISP.
Is it ok for you?
Stef
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
www.tudorgirba.com/blog
"Beauty is where we see it."