update sicp: add answer to exercise 1.40