Note: Best to run that program through `cweave` and read the typeset output, rather than read the `.w` file directly.
This is also a chapter in https://smile.amazon.com/Selected-Papers-Games-Lecture-Notes...
I would be lying if I said this was super easy to read. It is easy, though. Not sure if it is a good exposition for literate programming. I certainly like it, but I think I was predisposed to.