in reply to nested maps
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: