邝圣凯

Shengkai's Blog

转载 2. 找出最大的整数收藏

 | 旧一篇: 1. A+B

日期:2008-08-12


序:小惠未遍,民弗从也。


函数原型:(find-max-integer int-list)


参数:int-list为非空整数集的列表


返回:int-list中的最大值


源程序:

(define (find-max-integer int-list)
(let ((item (car int-list))
(rest (cdr int-list)))
(if (null? rest)
item
(let ((rest-max (find-max-integer rest)))
(if (> item rest-max)
item
rest-max)))))

发表于 @ 2008年08月20日 00:09:00|评论(loading...)|收藏

 | 旧一篇: 1. A+B

评论:没有评论。

发表评论  


当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
Csdn Blog version 3.1a
Copyright © 邝圣凯