3
我尝试这种“网上家教”为SICP这里:http://icampustutor.csail.mit.edu/6.001-public/tutor.cgi?op=registration-pageSICP车/ CDR实践问题的问题
我期待在以下问题:
假设我们已经评估
(define thing (cons (cons (cons 1 nil) nil)
(cons (cons 2 (cons 3 (cons 4 nil)))
(cons 2
(cons 3 nil))))) Write expressions
使用唯一的汽车,CDR的形式,和其东西 的值是下面给出 的列表结构。
(1)
(2 3)
(3)
我在与最后一个问题。我想出了一种使用反引号和取引号的方式,但在线教程不会接受答案。用鸡方案的解释:
#;3> (define nil '())
#;4> (define thing (cons (cons (cons 1 nil) nil)
---> (cons (cons 2 (cons 3 (cons 4 nil)))
---> (cons 2
---> (cons 3 nil)))))
#;5>
#;5> thing
(((1)) (2 3 4) 2 3)
#;25> `(,(car(cdr(car(cdr thing)))))
(3)
是否有另一种方式做到这一点?
如果任何版主看到这一点,请关闭它。 – ehsanul 2011-03-26 10:14:23
没有必要关闭,自我回答的问题是可以接受的:) – leppie 2011-03-26 10:21:00
这看起来像一个伟大的网站,我试图开始使用sicp,我刚刚注册。干杯! – bplus 2011-06-01 07:29:38