Collection Permutations/Combinations code?
ned at bike-nomad.com
Fri May 23 03:57:08 UTC 2003
On Thursday 22 May 2003 08:30 pm, Joshua 'Schwa' Gargus wrote:
> Does anyone have code that does something like:
> aCollection choose: 3 do: [:array | ...]
> where each possible unordered collection of 3 elements (ie:
> "n-choose-k", where n is the size of aCollection and k is here 3)
> is chosen from aCollection and passed as the argument to the block?
You mean like
there's also permutationsDo:
GPG key ID: BEEA7EFE
More information about the Squeak-dev