Exercise 1.35 in Guile Scheme