首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

The little Scheme小弟我的代码

2012-08-22 
The little Scheme我的代码今天回到屋子先睡了一觉,昨天没休息好,打了一宿蚊子,战果丰盛。睡醒后,开始,找一

The little Scheme我的代码
今天回到屋子先睡了一觉,昨天没休息好,打了一宿蚊子,战果丰盛。睡醒后,开始,找一些好听的音乐。最后该看书了,继续我的The Little Scheme。本来,我是先看SICP的,但是,看着看着不知怎么就跑到这本书了。还好这本比较薄,马上就要看完了。接下来,写了几个习题:

(define eqlist*  (lambda (lat1 lat2)    (cond    ((and (null? lat1) (null? lat2)) #t)    ((or (null? lat1) (null? lat2)) #f)    ((and (atom? (car lat1)) (atom? (car lat2))) (and (eq? (car lat1) (car lat2)) (eqlist* (cdr lat1) (cdr lat2))))    (else (and (eqlist* (car lat1) (car lat2)) (eqlist* (cdr lat1) (cdr lat2)))))))

热点排行