jmitchell (3) [Avatar] Offline
#1
It's possible to construct a game where either:

* there are letters to guess which aren't in the secret word (e.g. `MkWordState "Test" ['T', 'E', 'S', 'X']`)
* there are duplicate letters which means the player has to guess a single letter multiple times (e.g. `MkWordState "Test" ['T', 'E', 'S', 'T']`)
* there are lower-case letters which can't ever match input due to `toUpper` (e.g. `MkWordState "Test" ['T', 'E', 'S', 'x']`)


Fixing these issues would make for a good exercise.

jmitchell (3) [Avatar] Offline
#2
Hangman is revisited in Chapter 14, and these issues are resolved in the `NewGame` smart constructor and the `letters` helper function.