Hello,

 

I’m trying to concatenate many collections (sets) together. I learn (from beck’s book) that the use of stream is efficient so I try the following code

 

write _ WriteStream on: Set new.

write nextPutAll: (Set with:4 with:5)

write contents

 

but it doesn’t work because Set isn’t a member of a SequenceableCollection then it doesn’t understand the message : replaceFrom:to:with:startingAt:

 

Finally I try a code as:

write _ WriteStream on: {}.

write nextPutAll: (Set with:4 with:5)

write contents asSet

 

I’m happy with the result but I need just to know if there is another pattern to use Set and Stream.

 

Thanks,

Houssam

 

____

"Le paradis touche les pieds des mères..."

>>> http://csl.ensm-douai.fr/fakih