1

;如何得到'b'中'a'的值?

;不想在'b'中分配字母'a'想要'a'中包含的值

(define a 5)
(define c '(a c))
(define b (car c))
(display b)
4

1 回答 1

1
(define a 5)
(define c (list a 'c))
(define b (car c))
(display b)

'相当于quote程序。所以'(a c)=>(list 'a 'c)

见:http ://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Quoting.html#Quoting

或者,使用您的原始代码,您是在问您会怎么做(eval b (the-environment))

于 2013-02-22T16:37:59.370 回答