I have a list of n words (let\'s say 26). Now I want to get a list of all possible combinations, but with a maximum of k words per row (let\'s say 5)
So when my word
You could take a look at this
However, if you need to get large numbers of combinations (in the tens of millions) you should use lazy evaluation for the generation of the combinations.