sicp: added exercise 3.21