Code Review
Compare your solutions
#| BEGIN (Введите свое решение) |#
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(if (= n 1)
(lambda (x) (f x))
(compose f (repeated f (- n 1)))
)
)
(define (smooth f)
(define dx 0.001)
(lambda (x) (/ (+ (f (- x dx)) (f x) (f (+ x dx))) 3))
)
(define (repeated-smooth f n)
(repeated (smooth f) n))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(if (= n 1)
(lambda (x) (f x))
(compose f (repeated f (- n 1)))
)
)
(define (smooth f)
(define dx 0.001)
(lambda (x) (/ (+ (f (- x dx)) (f x) (f (+ x dx))) 3))
)
(define (repeated-smooth f n)
(repeated (smooth f) n))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(if (= n 1)
(lambda (x) (f x))
(compose f (repeated f (- n 1)))
)
)
(define (smooth f)
(define dx 0.001)
(lambda (x) (/ (+ (f (- x dx)) (f x) (f (+ x dx))) 3))
)
(define (repeated-smooth f n)
(repeated (smooth f) n))
#| END |#
#| BEGIN (Введите свое решение) |#
(define (compose f g)
(lambda (x) (f (g x))))
(define (repeated f n)
(if (= n 1)
(lambda (x) (f x))
(compose f (repeated f (- n 1)))
)
)
(define (smooth f)
(define dx 0.001)
(lambda (x) (/ (+ (f (- x dx)) (f x) (f (+ x dx))) 3))
)
(define (repeated-smooth f n)
(repeated (smooth f) n))
#| END |#