码迷,mamicode.com
首页 > 其他好文 > 详细

SCIP习题 1.10

时间:2017-11-22 22:00:51      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:efi   fine   else   sci   def   习题   define   cond   意思   

(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)

没搞懂这题有什么意思

SCIP习题 1.10

标签:efi   fine   else   sci   def   习题   define   cond   意思   

原文地址:http://www.cnblogs.com/R4mble/p/7880994.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!