Code from MIT's SICP course.