A long long time ago I wrote a Mastermind game in Pascal. And I recently watched a video of Peter Marks about lazy evaluation in Haskell. Mastermind is used as an example of lazy evaluation.
So here is my own version...
- the source code in Literate Haskell: mastermind.lhs
- the document rendered in Markdown: mastermind.md