lisp 点滴 关于变量,eq

etw0 posted @ 2009年4月03日 05:33 in scheme & lisp with tags Programming;lisp , 830 阅读

 

 L3also has a list <(A B C) as its value, but it is a different list than the one shared by L1 and L2

 

(setq L1 (list 'a 'b 'c))
-> (A B C)

 (setq L2 L1)
-> (A B C)

 (eq L1 L2)
-> T

 (setq L3 (list 'a 'b 'c))
-> (A B C)

 (eq L3 L1)
-> NIL

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter