Code samples and exercises from Understanding Computation (O'Reilly)