Problem 47 in Racket.