I would like to get a collection of permutations of another collection but I can't make it work. This ends up incorrectly with the same element many times in Bag p: | m p | m := #(1 2 3). p := Bag new. m permutationsDo: [:each | Transcript show: each ; cr. p add: each. Transcript show: p ; cr. ]. Transcript show: '------'; cr. p do: [:each| Transcript show: each; cr] But this very similar code ends up correctly with different elements in Bag p: | m p | m := #(1 2 3). p := Bag new. m do: [:each | Transcript show: each ; cr. p add: each. Transcript show: p ; cr. ]. Transcript show: '------'; cr. p do: [:each| Transcript show: each; cr] Any ideas about what am I doing wrong? How can I get a collection of permutations? Working in Pharo 1.4 one-click for Mac OSX. Thanks. -Ginny