Exercise 3.17 - counting pairs correctly and CHEAPLY using a global history and memq
Exercise 3.18 - checking for cyclic lists - for some reason, an internal history won't work
ah fixed a tiny bug and it works with an internal history, without set! at all, because we only worry about cdr and not branching tree structures