Exercise of the SICP book