让我的代码成为:
(defun ct (x)
(setq x '( (man noun singular)
(woman noun singular)
(likes verb singular)
(a article)
(man verbIplural)
)
)
)
如果我称之为(ct '(myplist))
它怎么能解决这个问题?
答案 0 :(得分:0)
CL-USER 20 > (defun ct (symbol)
(set symbol '((man noun singular)
(woman noun singular)
(likes verb singular)
(a article)
(man verbIplural))))
CT
CL-USER 21 > (ct 'myplist)
((MAN NOUN SINGULAR) (WOMAN NOUN SINGULAR)
(LIKES VERB SINGULAR) (A ARTICLE) (MAN VERBIPLURAL))
CL-USER 22 > myplist
((MAN NOUN SINGULAR) (WOMAN NOUN SINGULAR)
(LIKES VERB SINGULAR) (A ARTICLE) (MAN VERBIPLURAL))
在Lisp中,该列表实际上不是属性列表,而是关联列表。