Hi,
this solution is not exactly beautiful, but it works:
| input output |
input := #(1 2 3).
output :=
������ Array streamContents: [
������ ������ :stream |
������ ������ 1 to: input size do: [
������ ������ ������ :take |
������ ������ ������ input combinations: take atATimeDo: [
������ ������ ������ ������ :combination |
������ ������ ������ ������ stream nextPut: combination copy ] ] ].
output inspect
Michal
On 28.4.2015 20:02, stepharo wrote:
Hi
I'm looking for a method that given
������ #(1 2 3)
returns
������ #(
�������������� #(1)
�������������� #(2)
�������������� #(3)
�������������� #(1 2)
�������������� #(2 3)
�������������� #(1 3)
�������������� #( 1 2 3))
Stef