I have a function that receives lists. Lists received are of arbitrary lengths and the number of lists received cannot be known a priori.
I would like to be able to produce all combinations of the lists' elements while preserving the order of the lists. An example follows:
Suppose we have 3 lists:
list 1: (1,2)
list 2: (a,b)
list 3: (#,*,&)
i would like to produce the following:
1,a,#
1,a,*
1,a,&
1,b,#
1,b,*
1,b,&
2,a,#
2,a,*
2,a,&
2,b,#
2,b,*
2,b,&
In reply to Combinatorics problem by perlrocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |