This is a simple example for my CS undergrad students.  It is uncommented and a bit hacked together.