Problem 49 in Racket