![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lisp
文章平均质量分 58
institute
这个作者很懒,什么都没留下…
展开
-
SICP学习笔记--求值策略 (Evaluation strategy) --应用次序 (Applicative order) vs 正常次序 (Normal order)
“应用次序”(或“最左最内”)求值称呼函数的实际参数按可归约表达式的后序遍历从左至右的求值的策略。不像传值调用,应用次序求值尽可能的在应用函数之前归约函数体内的项。原创 2014-04-15 12:55:01 · 2359 阅读 · 0 评论 -
SICP学习笔2--循环与递归(iterative process and recursive process)
计算n!递归:(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1)))))原创 2014-04-15 14:14:35 · 943 阅读 · 0 评论 -
SICP学习笔3--lambda
(define (my_cons x y) (lambda (m) (m x y)))(define (my_car z) (z (lambda (p q) p)))(define (my_cdr z) (z (lambda (p q) q)))原创 2014-04-15 20:28:40 · 838 阅读 · 0 评论 -
SICP学习笔4--邱奇整数
邱奇非负整数0的定义如下:原创 2014-04-17 11:45:28 · 629 阅读 · 0 评论 -
SICP学习笔记5 ex2.17 -- ex2.23
; ex2.17(define (last-pair l) (if (null? (cdr l)) l (last-pair (cdr l)))); ex2.18(define (my_reverse l) (if (null? (cdr l)) l (append (my_reverse (cdr l)) (list (car l)原创 2014-04-18 12:15:07 · 832 阅读 · 0 评论 -
SCIP学习笔记-ex2.25--ex2.31
;Exercise 2.25. Give combinations of cars and cdrs that will pick 7 ;from each of the following lists:;(1 3 (5 7) 9)(define ex2.25-list1 (list 1 3 (list 5 7) 9))(define ex2.25-list1-get-7 (car (cd原创 2014-04-22 15:22:42 · 859 阅读 · 0 评论