Код Ревью

Сравни свои решения

    #| BEGIN (Введите свое решение) |#
(define (square x) 
  (* x x))

(define (cont-frac n d k)
  (define (iter counter buff)
    (if (> counter 0)
        (iter (- counter 1) (/ (n counter) (+ (d counter) buff)))
        buff))
  (iter k 0))

(define (tan-cf x k)
  (cont-frac (lambda (i)
                (if (= i 1)
                    x
                    (* -1 (square x))))
              (lambda (i) (- (* 2 i) 1))
              k))

#| END |#