Code Review

Compare your solutions

    #| BEGIN (Введите свое решение) |#
(define (even? n)
  (= (remainder n 2) 0))

(define (double x)
  (* x 2))

(define (halve x)
  (/ x 2))

(define (fast-mul a b)
  (cond ((or (= b 0) (= a 0)) 0)
        ((= b 1) a)
        ((even? b) (fast-mul (double a) (halve b)))
        (else (+ a (fast-mul a (- b 1))))))
#| END |#