Re: Creating all combinations of a dynamic sequence

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu