I am trying to extend the code from the top answer here:
Find all the possible N-length anagrams - fast alternatives
I need to do the same thing, but to yield