In Program A of the Appendix change the two lines: if(a && !singleton(a)) push(a, 0, 0); to: if(a) push(a, a, 0);