scala version of SICP practice solutions