Some code and tests I wrote while working through Toby Segaran's book