It looks like those more knowledgeable than me have already set you on the right path but I too, struggle with recursion and coming up with permutations. I finally put together a small script in Perl to help with this and wrote about it here if you're interested.
Gratias tibi ago
Leudwinus
In reply to Re: Please help me understand this permutation sub?
by Leudwinus
in thread Please help me understand this permutation sub?
by mdunnbass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |