1
我只是學習LISP和我有麻煩執行以下操作:簡單的LISP問題
; return ":h :i"
(defun get-char()
(loop for char across "ab"
collect (concatenate 'string ":" (string char))))
; plist
(defun get-list() (list :a "1" :b "2"))
; I cannot get this to work
; <-- returns all null, cannot get plist values :-(
(loop for x in (get-char)
collect (getf (get-list) x))
; this works fine...
(loop for x in '(:a :b)
collect (getf (get-list) x))
我知道IM接近,但我只是失去了一些東西。
非常感謝:-)
提示:可能要拿出一個更具描述性的標題不是 「簡單的LISP問題」 下一次。 :-) – Ken 2011-05-08 00:22:23