【发布时间】:2011-05-06 07:42:12
【问题描述】:
我正在尝试学习 LISP,但我对一些基本的东西很感兴趣 -
我想遍历一个列表并从列表值中查找一个 plist 值...
; here it just looks up the plist value
(defun get-plist-value(x) (getf (list :a "1" :b "2") x))
; this is what i want to do, but it doesnt work
; i have tried concatenating the ":" before the x value, but it didnt work either
(loop for x in '(a b) do (get-plist-value x))
; this works
(get-plist-value :a)
谢谢你:-)
【问题讨论】:
标签: lisp common-lisp