問題1.18

1.17の反復プロセス版を作れ

(define (fast-mul2 a b)
  (define (iter a b total)
    (cond ((= b 0) total)
	  ((even? b) (iter (double a) (halv b) total))
	  (else (iter a (- b 1) (+ total a)))))
  (iter a b 0))
  
(define (double x) (ash x 1))

(define (halv x) (ash x -1))

(define (even? n) (= (remainder n 2) 0))