我写的函数遍历变量在Lisp中
(defun test()
(let ((str1 "foo") (str2 "bar"))
(loop for s in '(str1 str2) do (message s))))
,但它不工作。在elisp的回溯消息是:
Debugger entered--Lisp error: (wrong-type-argument stringp str1)
我怎样才能使它发挥作用?
PS:以下修改后的版本完美的作品,但我需要的原始版本
(defun test1()
(loop for s in '("asdf" "fdsa") do (message s)))
有点复杂 - 一个simeple (名单STR1 STR2) 会做的一样好 – 2009-01-28 14:50:44