SICP 练习1.43 repeated

来源:互联网 发布:windows xp pack2 编辑:程序博客网 时间:2024/05/16 02:52
(define (compose f g)  (lambda (x) (f (g x))))(define (repeated f times)  (if (= times 1)    f    (compose f (repeated f (- times 1)))))(define (square x)  (* x x))((repeated square 2) 5)
0 0
原创粉丝点击