SICP习题 1.10(Ackermann函数)

mac2022-06-30  29

(define (A x y) (cond ((= y 0) 0) ((= x 0) (* 2 y)) ((= y 1) 2) (else (A (- x 1) (A x (- y 1))))))

(A 1 10)

(A 2 4)

(A 3 3)

(define (f n) (A 0 n))(f 0)(f 1)(f 2)(f 3)

没搞懂这题有什么意思

转载于:https://www.cnblogs.com/R4mble/p/7880994.html

相关资源:SICP 习题答案
最新回复(0)