Exercise 32 in HtDP.