A similar question was asked in Trying to construct all possible strings from 4 bases [ATCG]. In addition to loops and recursion, the responses to that post include solutions that use the following:
In reply to Re: nested maps
by bobf
in thread nested maps
by jczeus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |