(define num-sixes ; number of 6's in
(lambda (n) ; decimal representation of n
(cond ((< n 0) (num-sixes (- n)))
((= n 0) 0)
((= (remainder n 10) 6) (+ 1 (num-sixes (quotient n 10))))
(else (num-sixes (quotient n 10))))))
(define num-odds ; number of odd digits
(lambda (n) ; in decimal representation of n
(cond ((< n 0) (num-odds (- n)))
((= n 0) 0)
((odd? (remainder n 10)) (+ 1 (num-odds (quotient n 10))))
(else (num-odds (quotient n 10))))))
Q: How do these differ?