读书人

lisp-联系关系列表

发布时间: 2013-02-27 10:48:11 作者: rapoo

lisp-关联列表

* (defparameter *xxx* '((liu . 123)(wang 121)))*XXX** *xxx*((LIU . 123) (WANG 121))* *xxx*((LIU . 123) (WANG 121))* (assoc 'liu *xxx*)(LIU . 123)* (assoc 'wang *xxx*)(WANG 121)* (push '(liu 5678) *xxx*)((LIU 5678) (LIU . 123) (WANG 121))* (assoc 'wang *xxx*)(WANG 121)* (assoc 'liu *xxx*)(LIU 5678)* (assoc 'liu *xxx*)(LIU 5678)* (assoc 'liu *xxx*)(LIU 5678)* *xxx*((LIU 5678) (LIU . 123) (WANG 121))* (push '(liu 56789) *xxx*)((LIU 56789) (LIU 5678) (LIU . 123) (WANG 121))* (assoc 'liu *xxx*)(LIU 56789)*

?

?

可以有相同的键,默认返回第一个匹配的键,可以对值更改的一个记录

读书人网 >编程

热点推荐