import chapter 11

convert the syntax of https://gist.github.com/whitequark/6210961
to fit this repo.