Hello Rene Paul 


compare

| res |
res := OrderedCollection new. 
#($a $b $c) do: [:aChar | res add: aChar].
res 

an OrderedCollection($a $b $c)

| res |
res := OrderedCollection new. 
#($a $b $c) do: [:aChar | res add: aChar; add: $,].
res 

an OrderedCollection($a $, $b $, $c $,)


and 

| res |
res := OrderedCollection new. 
#($a $b $c) do: [:aChar | res add: aChar] separatedBy: [res add: $,].
res 

an OrderedCollection($a $, $b $, $c)


On 18 Sep 2025, at 02:59, Rene Paul Mages (ramix) via Pharo-users <pharo-users@lists.pharo.org> wrote:



Le 18/09/2025 �� 01:35, Rene Paul Mages (ramix) via Pharo-users a ��crit :
Hello,
Please give me a hint to understand the "do: separatedBy:" keyword message used in ProfStef tutorial :
 i) in Pharo version 12 :
   https://ramix.org/pharo/ProfStef/iterators23.png
ii) in Pharo version 13 :
   https://ramix.org/pharo/ProfStef/iterators25.png

I am using the FINDER to search do:separatedBy:

and also the BROWSER  (  Method: Collection>>do:separatedBy: )

https://ramix.org/pharo/ProfStef/MethodCollection.png

    but I don't understand the explanations.

Nota Bene :

I am rereading the chapter 9 (Collections) of Pharo_By_Example :

https://scg.unibe.ch/download/pharobyexample/PBE1-2010-02-01.pdf

--
Thanks for your help.
Rene Paul Mages (ramix) GnuPG key : 0x9840A6F7
https://sites.google.com/view/les-logiciels-libres/pharo
https://twitter.com/RenePaulMages

St��phane Ducasse
http://stephane.ducasse.free.fr
06 30 93 66 73

"If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.��� Calvin & Hobbes