(load "1.42.txt") ; for compose and square
(define (repeated f n)
(if (= n 1)
f
(compose f (repeated f (- n 1)))))
; 1 ]=> ((repeated square 2) 5)
;
; ;Value: 625
; expand range to include n = 0
(define (identify x) x)
(define (repeated2 f n)
(if (= n 0)
identify
(compose f (repeated2 f (- n 1)))))