标签:
#lang racket (define (repeated f n) (define (compare f1 f2) (lambda(x) (f1 (f2 x)));lambda );compare (define (doing result n) (if (= n 1) result (doing (compare result f) (- n 1)) );if );doing (doing f n) );repeated (define (square x) (* x x) );square ((repeated square 2) 5)
最后结果: 625
标签:
原文地址:http://www.cnblogs.com/wizzhangquan/p/4392664.html