based on the book Concrete Abstraction - An Introduction to CS using Scheme