'abcde' combinations: 2 atATimeDo: [:each | Transcript cr; show: each printString].�
produces the expected result:
#($a $b)
#($a $c)
#($a $d)
#($a $e)
#($b $c)
#($b $d)
#($b $e)
#($c $d)
#($c $e)
#($d $e)
but, if you add :each to a collection instead of printing, you get something different. The following code:
res := OrderedCollection new.�
�'abcde' combinations: 2 atATimeDo: [:each | res add: each].�
Transcript show: res.
produces:
an OrderedCollection(#($e $e) #($e $e) #($e $e) #($e $e) #($e $e) #($e $e) #($e $e) #($e $e) #($e $e) #($e $e))