Code Review

Compare your solutions

    #| BEGIN (Введите свое решение) |#
(define (mul-iter a b)
  (define (double n)
    (* n 2))
  (define (halve n)
    (/ n 2))

  (define (fast-mul-iter a b res)
    (cond ((= b 0) res)
          ((even? b) (fast-mul-iter (double a) (halve b) res))
          (else (fast-mul-iter a (- b 1) (+ res a)))))

  (fast-mul-iter a b 0))
#| END |#