The transform 3-$l only works if you are working with 1 and 2 as your permuted set; it happens that for that set 3-$l is equivalent to "the member of the set that is not $l". If you need any degree of flexibility, you should follow the code in Re: How can one generate all possible combinations with reference to string positions?, subject to BrowserUK's comments.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^3: How can one generate all possible combinations with reference to string positions?
by kennethk
in thread How can one generate all possible combinations with reference to string positions?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |