working through the examples in Tom Stuart's "Understanding Computation"