Re: Creating all combinations of a dynamic sequence
- Posted by cp Jul 02, 2010
- 1072 views
If I have something like
for a = 1 to length(sMySeq[1]) do for b = 1 to length(sMySeq[2]) do for c = 1 to length(sMySeq[3]) do ....
It seems this will only handle the 3 sequences in sMySeq. What if sMySeq now looks like
sMySeq = {{a1,a2},{b1,b2},{c1,c2},{d1,d2,d3}}
I'm thinking this needs some sort of recursive function but just not sure how to go about it. thanks