we first need to be able to generate a list of all
the codes, ie all length n combinations of the 6 colors. In general,
Mastermind games use codes of length 4, however in theory the code
could be any length. We have not yet made any assumptions about
the lengths of the codes, so why start now? Your function should
take in a length and return all Codes of that length:
allCodes :: Int -> [Code]
Hint: This exercise is a bit tricky. Try using a helper function that takes in all the codes of length n − 1 and uses it to produce all codes of length n. You may find the concatMap function helpful.