That is strange. In VW it works. I did not look at the Pharo
implementation, though so I do not know what is different.
Cheers,
Doru
On 30 Mar 2009, at 18:03, Simon Denier wrote:
I ran into the following problem (related to
FamixModelExtractionTest even if it's more general)
(#((1) (3) () ()) flatCollect: [ :each ])
returns
#(1 3 nil nil)
when one expects #(1 3)
flatCollect: is defined in Colllection, I dont want to override it
if possible.
Collection>>flatCollect: aBlock
| stream |
self isEmpty ifTrue: [ ^ self copy ].
stream := (self species new: self size) nsWriteStream.
self do: [ :each | stream nextPutAll: (aBlock value: each) ].
^ stream contents
Can someone find an elegant solution which would "shrink" the
resulting array to its non-nil content?
--
Simon
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Every successful trip needs a suitable vehicle."