Question: nesting seq a variable number of times

I would like to do a nested sequence (or for loop) but the number of iterations is not necessarily fixed: I tried doing the following: nestedseq:=proc(numtimes,middle) return cat(seq(`seq(`,i=1..numtimes),middle,seq(`,j[i]=[1,2,3]) `,i=1..numtimes)); end proc; But then I get a string with the desired command but I cannot evaluate it. Is there a better way to do these iterated sequences? Thanks a lot,
Please Wait...